AlexW00 / obsidian-note-linker

🔗 Automatically link your Obsidian notes.
MIT License
200 stars 10 forks source link

Allow links to implemented on a per note basis #6

Closed bobbymeyer closed 2 years ago

bobbymeyer commented 2 years ago

I see a lot of potential in this tool, but it is difficult to get started when you already have a sizable library.

It would be helpful if I could implement links on a per file/note basis, as opposed to the entire vault.

AlexW00 commented 2 years ago

Great suggestion, this is a feature that's definitely implementable. The current matching function checks every note for every other note title/alias. A mode, in which e.g. only the currently open file would be searched for links could be implemented by creating a function, which just checks the current note for every other note title/alias as opposed to how matching currently works.

The relevant code would have to be implemented in lib.rs by modifying the find(..) function so that it does not loop over all notes, but only executes find_links for a provided Note (can be added as an extra parameter).

Searching only the current note for links would also be great with #3. I can look into implementing this, since I don't think it would be a lot of work.

AlexW00 commented 2 years ago

Implemented in decd85b741dcc622ab75963ac3814385b18253fd. I will also add some Obsidian commands to quickly search the active note, without having to navigate through the whole popup. This feature will be available with the next release.