feat: add (note) node for highlighted notes and warnings#115
Conversation
|
Oh, thanks for doing this! Haven't found time to sit down and have it done. Really glad you have 🙏 I didn't actually test it (because not really sure how to), but a list of what is captured as So it also needs the default links for |
Well, in your colorscheme, whatever that may be, unless you don't want to see them ;) (They're standard nvim-treesitter captures, so any colorscheme that "supports" nvim-treesitter should have them.) For the default colorscheme, I'd wait since these captures are due to be changed in nvim-treesitter (and after that in core). |
Add support for highlighting common call-out terms in documentation, like the legacy syntax's `helpNote`, `helpWarning`, `helpDeprecated`. However, only the variants with a colon are supported, as these account for 99% of use in Nvim documentation without the danger of false positives (and to keep symbol count low). To keep state count low, all these are parsed as a single `(note)` node that captures can disambiguate using `#any-of?`.
|
Thanks, Christian! |
| note: () => choice( | ||
| 'Note:', 'NOTE:', 'Notes:', | ||
| 'Warning:', 'WARNING:', | ||
| 'Deprecated', 'DEPRECATED:' |
There was a problem hiding this comment.
That wasn't part of the OG syntax file.
We can consider this if we officially stop trailing vimdox in favor of our own "nvimdoc" (i.e. a more strictly specified dialect).
There was a problem hiding this comment.
I suppose we can use Warning: instead of Experimental:.
Add support for highlighting common call-out terms in documentation, like the legacy syntax's
helpNote,helpWarning,helpDeprecated.However, only the variants with a colon are supported, as these account for 99% of use in Nvim documentation without the danger of false positives (and to keep symbol count low).
To keep state count low, all these are parsed as a single
(note)node that captures can disambiguate using#any-of?.@echasnovski