You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read all the tree-sitter docs if it relates to using the parser
Is your feature request related to a problem? Please describe.
Currently, URLs are just treated as "normal" text within a paragraph/node. This means they can't be specifically queried for things like syntax highlighting, turning off spell-checking, etc. Particularly re: spell-checking, this makes for some noisy documents... e.g. note the squiggles below:
In the pre-tree-sitter days, one could simply regex match to disable spell-check as described here, for example.
Describe the solution you'd like
If URLs could be targeted with queries, it would be easy to turn off spell-check for them and also for color schemes to highlight URLs as they see fit. (Which is a common practice in various text editors, markdown viewers, etc.)
Describe alternatives you've considered
Just for the spell-check issue, my current workarounds involve one of the following:
Making all links explicitly [markdown links](http://blah.org)
Making all links explicitly <http://auto-links.org>
Turning off tree-sitter for markdown 😢
I've also experimented with the additional_vim_regex_highlighting option as described in the nvim-treesitter docs, but enabling it (and explicitly setting syntax on) still doesn't seem to allow the :syn match UrlNoSpell '\w\+:\/\/[^[:space:]]\+' contains=@NoSpell call to behave as expected -- tree-sitter must be completely disabled.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Did you check the tree-sitter docs?
Is your feature request related to a problem? Please describe.
Currently, URLs are just treated as "normal" text within a paragraph/node. This means they can't be specifically queried for things like syntax highlighting, turning off spell-checking, etc. Particularly re: spell-checking, this makes for some noisy documents... e.g. note the squiggles below:
In the pre-tree-sitter days, one could simply regex match to disable spell-check as described here, for example.
Describe the solution you'd like
If URLs could be targeted with queries, it would be easy to turn off spell-check for them and also for color schemes to highlight URLs as they see fit. (Which is a common practice in various text editors, markdown viewers, etc.)
Describe alternatives you've considered
Just for the spell-check issue, my current workarounds involve one of the following:
[markdown links](http://blah.org)
<http://auto-links.org>
I've also experimented with the
additional_vim_regex_highlighting
option as described in the nvim-treesitter docs, but enabling it (and explicitly settingsyntax on
) still doesn't seem to allow the:syn match UrlNoSpell '\w\+:\/\/[^[:space:]]\+' contains=@NoSpell
call to behave as expected -- tree-sitter must be completely disabled.Additional context
No response
The text was updated successfully, but these errors were encountered: