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
One thing I haven't been able to figure out how to do it is to match the preceding whitespace for a tag if there is any.
This doesn't seem to be part of the actual comment i.e. this parser I don't think covers it, and I'm also unable to use #offset! to extend the range of the injection so I guess my question is, is this currently possible with a query (as far as you can see) or would it require this parser to be able to include it?
The text was updated successfully, but these errors were encountered:
Hi, the offset directive currently only works with queries for injections, I thought there was an issue tracking this on neovim, but the closes to this is neovim/neovim#16032.
Once the offset directive is supported on highlights queries, you should be able to write a query and/or directive to include the surrounding spaces.
Another solution would be for the parser to expose the "whitespace" nodes
Thanks for the response @stsewd and linking the nvim issue. I guess wondering re. the whitespace issue since it appears that the capture/match (not sure the right term) can be extended to include whitespace if it can optionally also contain a capture that includes the whitespace, so it all stays the same for everyone and matches what it currently does but then also there is a larger node like (tag_with_space) or a sane name that includes the leading space. That way you don't have to expose the white space explicitly, unless this somehow forces you to do that
I'm trying to achieve the equivalent of the highlighting provided by something like https://github.com/folke/todo-comments.nvim or the following emacs screenshot.
One thing I haven't been able to figure out how to do it is to match the preceding whitespace for a tag if there is any.
This doesn't seem to be part of the actual comment i.e. this parser I don't think covers it, and I'm also unable to use
#offset!
to extend the range of the injection so I guess my question is, is this currently possible with a query (as far as you can see) or would it require this parser to be able to include it?The text was updated successfully, but these errors were encountered: