-
Notifications
You must be signed in to change notification settings - Fork 62
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
TreeSitter Color Changes #154
Comments
Doing more digging on my own problem… TreeSitter does introduce a number of new highlight groups. I think this also makes this issue related to #153… but potentially an opportunity to talk about it more. |
Messing around with moonfly because my beloved gruvbox doesn't have treesitter syntax yet. References: - https://github.com/bluz71/vim-moonfly-colors - gruvbox-community/gruvbox#154
Messing around with moonfly because my beloved gruvbox doesn't have treesitter syntax yet. References: - https://github.com/bluz71/vim-moonfly-colors - gruvbox-community/gruvbox#154
Leaving notes for myself as I try to maybe fix an issue that I raise… looks like there's at least one person who has hacked this into their setup: https://github.com/timbedard/dotfiles/blob/9e53b4c09c55113d09ff3a939313bcfc8e8d5452/config/nvim/lua/minimal.lua#L16-L26 |
Messing around with moonfly because my beloved gruvbox doesn't have treesitter syntax yet. References: - https://github.com/bluz71/vim-moonfly-colors - gruvbox-community/gruvbox#154
Messing around with moonfly because my beloved gruvbox doesn't have treesitter syntax yet. References: - https://github.com/bluz71/vim-moonfly-colors - gruvbox-community/gruvbox#154
here is what im using for this: hi! link TSAnnotation GruvboxAqua
hi! link TSBoolean GruvboxPurple
hi! link TSCharacter GruvboxPurple
hi! TSComment cterm=italic
hi! link TSComment GruvboxGrey
hi! link TSConstructor GruvboxOrange
hi! link TSConditional GruvboxRed
hi! link TSConstant GruvboxFg
hi! link TSConstBuiltin GruvboxPurple
hi! link TSConstMacro GruvboxPurple
hi! link TSError GruvboxRed
hi! link TSException GruvboxRed
hi! link TSField GruvboxFg
hi! link TSFloat GruvboxPurple
hi! link TSFunction GruvboxGreenBold
hi! link TSFuncBuiltin GruvboxOrange
hi! link TSFuncMacro GruvboxAqua
hi! link TSInclude GruvboxAqua
hi! link TSKeyword GruvboxRed
hi! link TSLabel GruvboxRed
hi! link TSMethod GruvboxGreenBold
hi! link TSNamespace GruvboxAqua
hi! link TSNone GruvboxPurple
hi! link TSNumber GruvboxPurple
hi! link TSOperator GruvboxOrange
hi! link TSParamter GruvboxFg
hi! link TSParameterReferance GruvboxFg
hi! link TSProperty GruvboxBlue
hi! link TSPunctDelimiter GruvboxFg
hi! link TSPunctBracket GruvboxFg
hi! link TSPunctSpecial GruvboxFg
hi! link TSRepeat GruvboxRed
hi! link TSString GruvboxGreen
hi! link TSStringRegex GruvboxYellow
hi! link TSStringEscape GruvboxOrange
hi! link TSTag GruvboxBlue
hi! link TSTagDelimiter GruvboxAqua
hi! link TSText GruvboxFg
hi! link TSLiteral GruvboxFg
hi! link TSURI GruvboxAqua
hi! link TSType GruvboxYellow
hi! link TSTypeBuiltin GruvboxYellow
hi! link TSVariable GruvboxFg
hi! TSEmphasis cterm=italic
hi! TSUnderline cterm=underline Its nowhere near perfect, but it works somewhat. |
Messing around with moonfly because my beloved gruvbox doesn't have treesitter syntax yet. References: - https://github.com/bluz71/vim-moonfly-colors - gruvbox-community/gruvbox#154
Messing around with moonfly because my beloved gruvbox doesn't have treesitter syntax yet. References: - https://github.com/bluz71/vim-moonfly-colors - gruvbox-community/gruvbox#154
https://github.com/npxbr/gruvbox.nvim has Treesitter support |
I absolutely love that there's a lua port now. MRs happily accepted for this issue, might not get a chance to add it myself, just quickly going through issues. |
@ellisonleao No message system on GitHub but I sent you an invite to become a gruvbox-community owner, you're free to accept it or not. Trying to get more people in the group so it isn't completely blocked without me and I don't see any better qualification than making a fork like this. You don't have to actually do anything in the group if you don't want to. |
hey @rbong really appreciate it! I will definitely accept it and also hope to start contributing soon! |
Hey guys, I've been trying to make those highlight links work and I faced some strange (maybe expected) behaviour. I tried to make something as follows, requiring this file in
Looks like that Does anyone know what may be happening? Just to help someone that may be facing this issue, I did a workaround by creating a Sorry if I'm missing something. Thanks in advance. |
Is treesitter support on the menu? |
Accepting all pull requests :) I don't plan to use treesitter until neovim 0.5 is released, at that point I may add it myself. |
@luisiacc if you want, https://github.com/npxbr/gruvbox.nvim/ is a lua port of this plugin and it already has treesitter support |
Sorry to ask, but is going to get updated? |
@ellisonleao seems to be actively committing to his gruvbox.nvim repository. I’m sure a pull request will show up eventually. |
We've been discussing this over in #183 The issue with defining specific TreeSitter highlight groups is that it runs contrary to how gruvbox has treated highlight groups up to this point. That is - we have carefully tweaked highlight groups for every single language. TreeSitter makes highlight groups consistent over every single language. If we adopt this change, some people are going to end up with colors they don't like because they're not used to them. There's no avoiding it, so let's do it as smart as possible so it at least feels consistent and won't lead to fighting over different colors. Also, most (not all) of the TreeSitter styles just link back to previously defined highlight groups. We may want to develop a spec sheet (as saccarosium pointed out both Dracula and Nord have one), make sure the linked highlight groups from TreeSitter are defined well, and then just fill in any special highlight groups we need (like TSKeywordOperator because of #153). This might be a bad solution though, because if we develop a spec sheet we either:
So maybe Gruvbox is just permanently a bunch of ad-hoc colors, even with general highlight groups that span across languages. Right now though, I am leaning towards developing a spec sheet based on the colors we have now, backporting it, dealing with the inevitable influx of requests, and coming out the other end as a better colorscheme. |
this is an init.lua for neovim… I've got a branch here.
I've been playing with nvim treesitter syntax stuff… and while it's more detailed than before, I kind of get the feeling that it's making new highlight groups that gruvbox doesn't know about? I'm new to working with highlights.
Before TreeSitter (using
:TSToggleAll highlight
to disable it):After TreeSitter:
It's just kind of weird… no matter what language I stare at it in… there's a little more garish (maybe bold?) and a lot more red. I like the extra detail in things like regex and strings… but it kind of subverts the colors I've become accustomed to.
Anyone looked at this?
The text was updated successfully, but these errors were encountered: