-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also Experimental:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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