tth05 / obsidian-completr

Auto-completion plugin for the obsidian editor.
MIT License
291 stars 18 forks source link

Resources and Questions #4

Closed brimwats closed 2 years ago

brimwats commented 2 years ago

Hello!

Thanks for developing this plugin. I thought I would offer you a link to the biggest list of frequency dictionaries I know so that you can either incorporate it or provide it as a resource to users: https://github.com/kpym/FrequencyDictionaries

In exchange, i had a feature request and a question. Question first:

Feature request:

Would it be possible for us to add things to the YAML suggester? I would like to add things like my supercharged link types (usually take the form of fileClass: <type> and then <type>Type: <subtype>. I could think of others things I'd like to add (common custom breadcrumbs features) but thought I'd start there :)

tth05 commented 2 years ago

I thought I would offer you a link to the biggest list of frequency dictionaries I know so that you can either incorporate it or provide it as a resource to users.

I've added it to the README for now.

How does this differ from the Various Complements plugin?

I think the main difference is the LaTeX support. You can look at the README examples to see for yourself if you like it more or less.

Do you know if it is more or less performant with large files?

It should be. If not, you can tell me what your files looks like and I'll improve the performance.

Would it be possible for us to add things to the YAML suggester?

The supercharged links are an interesting use-case. I'd prefer if the plugin just learns your already existing YAML keys and then provides them as suggestions. Basically if any file has something like

---
fileClass: class1
someType: type1
---

the plugin could learn these two tags and their values and then provide all of these as suggestions later. E.g. if you were to type in a different file:

fileC<lass>: cl<ass1>
so<meType>: t<ype1>

(Everything inside of <...> would be a suggestion by the plugin).

Is that what you want/do you like how it would be implemented? Or do you specifically want to specify your custom tags manually?

brimwats1 commented 2 years ago

Is that what you want/do you like how it would be implemented? Or do you specifically want to specify your custom tags manually?

yes that's exactly right! the stuff in the first row the left side is always fileClass, but below that I have ThingType MetaType and those go like ThingType: Definition or Annotation or something the MetaTypes are Folder, Project, etc. it's fine by me if the plugin learns it as long as there's an easy way for it to "unlearn" if the name changes slightly. does that make sense?

brimwats1 commented 2 years ago

(am in the process of merging two GitHub accounts so that's what's happening here 😂)

tth05 commented 2 years ago

yes that's exactly right! the stuff in the first row the left side is always fileClass, but below that I have ThingType MetaType and those go like ThingType: Definition or Annotation or something the MetaTypes are Folder, Project, etc. it's fine by me if the plugin learns it as long as there's an easy way for it to "unlearn" if the name changes slightly. does that make sense?

Ok nice. I'll get to work on this then. Unlearning shouldn't be a problem because the plugin won't save anything it has learned.

brimwats commented 2 years ago

So would it then still suggest the fileClass in a new or different file, or are those not persistent between files?

tth05 commented 2 years ago

No, everything is global. I just meant that if you save a file and a specific key isn't in any other file anymore, it will automatically be removed. When you start obsidian all your files are scanned for keys and after that only when you save a file, but no data is saved when closing obsidian, meaning no non-existent keys will be suggested.

brimwats1 commented 2 years ago

thanks for clarification :)

eleanorkonik commented 2 years ago

In a similar vein, I was wondering if anyone happen to know of any good lists for frequent phrases? I'd love to have a way to autocomplete common phrases (either ones I use, or like, the ones Google uses for email haha) instead of just one word...

tth05 commented 2 years ago

@brimwats Implemented in b7530af5061415e22b74a0f45088e39bed3d5495 :)

tth05 commented 2 years ago

@eleanorkonik I think you'd be better off asking in the obsidian forums or discord where more people would see your question.