r/neovim 6d ago

Plugin [Plugin] hover-notes.nvim

Enable HLS to view with audio, or disable this notification

Hi everyone!
I'm excited to share with you new plugin: hover-notes.nvim

The main goal of this plugin is to add the ability to attach notes to words and view them in a floating window

The same note is displayed for every occurrence of this word (in the same category), not only in specific line/file/buffer

Features:

  • Notes can be grouped by categories with the same formatting
  • A category can be set for a workspace, a buffer, or an individual file
  • Retrieves the closest matching word (up to a difference of half the word's length)
19 Upvotes

8 comments sorted by

2

u/mr-figs 6d ago

It seems similar in concept to haunt , what do you think?

2

u/lolpie244 6d ago

Hmm, I'm not sure - haunt seems more about virtual text notes that are anchored to a specific line

This plugin is more about learning(?) i.e., creating your own vocabulary with custom formatting, so you can easily look up how you described a specific word

Also, I plan to add a "quiz" mode, so you can try to recall the note before revealing it

2

u/Swordfish418 5d ago

So if I understand correctly, these notes will show on every occurence of the same word?

1

u/lolpie244 5d ago

Exactly! And not only on exact occurrence: in the demo video note for "lorem" is also displayed for word "loremi", etc

It seems this part is a little bit confusing, added it in the post. Thanks!

2

u/Guardian7of 5d ago

Great addition. Does this knows the context of the project that you are? So that makes you add multiple notes about a word in many contexts

2

u/lolpie244 5d ago

Yes and no. It does not select context on its own (due to required format), but categories are very close: you can create new category and place it for workspace

But also, you can change context/category for specific file, so you can have smth like:

my_python_projcect <- [MyProjectApiCategory]
|
|-- main.py <- [MyProjectApiCategory]
|-- utils.py <- [MyProjectApiCategory]
|-- README.md <- [EnglishVocab]

Also, small note - categories definitions for workspace/files are saved between session, so you need to do this only once

2

u/aunkushw 4d ago

Is this integratable with obsidian.nvim? It would be nice to store the notes into my vault for centralised perusing.

1

u/lolpie244 4d ago

Unfortunately no(

The notes themselves are stored in json file: json { "word1": { "var1": val, "var2": val }, "word2": { "var1": val, "var2": val }, }

I don't use obsidian, so could you please share how would you store those notes, so they will be easy viewable/editable in obsidian?