-
Notifications
You must be signed in to change notification settings - Fork 47
feat: improved TSHighlightCapturesUnderCursor #38
Conversation
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.
Nice work! Using the highlighter directly will help a lot to show its bugs 😄 (btw there was no reparse before :parse
does incremental parsing which will be NOOP when highlighting is used and the parsing result is already up-to-date)
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.
@steelsojka could you have a look on this? You know more about the highlighter
Hi, sorry, was busy with another plugin :) I actually based most of the code on the Treesitter highlighter in the Neovim runtime |
right, good point. Wasn't aware of this 😄 |
Thanks for the contribution! |
You're welcome and thank you for all the great work on the playground! |
table.insert(lines, "# Treesitter") | ||
matches = M.get_treesitter_hl() | ||
else | ||
table.insert(lines, "# Syntax") |
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.
One change that could maybe be done is to handle the the case where you have tree-sitter and set syntax
st the same time
Fixes #37
Added the following improvements:
Treesitter Captures
Lua Comment Captures
Syntax Highlight Groups when treesitter highlight is disabled