Closed GNOMES closed 8 months ago
I'm not sure why the treesitter version isn't working (though pro doesn't yet have many of the updates here), but the regular syntax looks correct. If you want different colors for the header levels, that's pretty easy to customize once you know the highlight groups (which you can find in the code or by using the syntax APIs).
Could you confirm which version of neovim you're on? I'm currently working on a patch to add new TS groups introduced in neovim master.
Currently 0.9.5 via homebrew
On Sat, Feb 3, 2024, 12:17 stnley @.***> wrote:
Could you confirm which version of neovim you're on? I'm currently working on a patch to add new TS groups introduced in neovim master.
β Reply to this email directly, view it on GitHub https://github.com/dracula/vim/issues/317#issuecomment-1925420236, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABY5ZHVNLPSHG5QCWUUA7GTYRZ5NDAVCNFSM6AAAAABCXWH5QOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRVGQZDAMRTGY . You are receiving this because you authored the thread.Message ID: @.***>
Looking at highlight_group.c
in the neovim 0.9.5 release, I do not see any tree-sitter groups which are undefined (either by this theme directly, or by this theme modifying the default group linked by neovim).
This is what I see when using neovim 0.9.5, nvim-treesitter HEAD, and additional_vim_regex_highlighting = false
.
If you put your cursor on a markdown heading and run :TSHighlightCapturesUnderCursor
what is the result?
This is mine:
Now, because nvim-treesitter and neovim have been changing their captures/groups my thought was to write a patch to add what is missing from nvim-treesitter to this theme. I wanna make sure I include anything you're missing too.
Hmm, I don't have :TSHighlightCapturesUnderCursor
. Can you confirm the exact command you are running?
I see references to this command online in the now archived nvim-treesitter/playground
, which says the functionality was merged into Nvim itself.
Trying the merged :Inspect
command, I see the following on headings:
:Inspect
Treesitter
- @markup.heading.2.marker.markdown links to @markup markdown
For a level 2 "##" headings.
@GNOMES would you mind updating this plugin and providing feedback? New treesitter groups were just merged.
Working great!
On Fri, Feb 23, 2024, 08:21 stnley @.***> wrote:
@GNOMES https://github.com/GNOMES would you mind updating this plugin and providing feedback? New treesitter groups were just merged.
β Reply to this email directly, view it on GitHub https://github.com/dracula/vim/issues/317#issuecomment-1961410620, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABY5ZHXQE5SW6R4WW2T4KZ3YVCQVBAVCNFSM6AAAAABCXWH5QOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRRGQYTANRSGA . You are receiving this because you were mentioned.Message ID: @.***>
Great, can we close this?
I currently have Treesitter installed in Neovim, which suggests disabling Neovim's native highlighting for performance (additional_vim_regex_highlighting = false) vs duplicating highlights.
When using the Treesitter "Markdown" parser and Dracula.vim, all of the text is white, while tables are pink dash lines (note I have replaced the colors with Van Helsing Pro colors):
It appears that Dracula.vim is not support Treesitter highlight groups for Markdown files.
Running "set syntax=markdown" to turn the native highlighting back on introduces coloring, but it is not very contextually aware beyond headings types and bulleted lists.
I ran across this thread that mentions that themes need to support the parser highlight groups, or it will not work: https://www.reddit.com/r/neovim/comments/rg97j4/comment/hoiwnbj/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button
As noted by one of the users, I installed Cattpucin to test this implementation, and it does appear to be improved for headings for example:
Should this context aware highlighting already be working? Are there suggestions on how to implement this for a possible future PR or my own personal dotfiles?