`hls-notes-plugin` could offer completions and help creating Notes
hls-notes-plugin could offer completions for Note references, e.g. when I am typing in a comment context:
-- See Note [
we could offer all the known Notes here. This would make it even easier to reference notes without too much thinking.
Similarly, when creating a Note, we might want to help the user write the note as it is currently an undocumented specification used by GHC. However, I don't know yet how this should look like, just writing down the idea for now.
cc @jvanbruegge, what do you think about this feature request?
This could be a good first issue for new contributors as well, and I am proposing it as a good issue for hackathons.
Yeah, the completion for existing notes is a definitely a good idea, and for the other thing it maybe could suggest a snippet?
I think the snippets could work but it is a bit tricky, as the number of ~ depend on the lenght of the name, right?
E.g.
-- Note [${1:note name}]
-- ~~~~~~~~~~~~~~~ <- How many of those?
Or is the plugin flexible enough to work with, let's say at least 3 ~, but it doesn't need to match exactly the length of the note title?
The latter, and this is actually what GHC does as well. IIRC it is three tildes