-
-
Notifications
You must be signed in to change notification settings - Fork 274
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 support #235
Comments
FYI: I added some settings and achieved this colorful code. hi TSConditional guifg=#88c0d0
hi TSConstant guifg=#d8dee9 gui=bold
hi TSConstructor guifg=#ebcb8b gui=bold
hi TSException guifg=#88c0d0 gui=italic
hi TSKeyword guifg=#9a6590 gui=bold
hi TSMethod guifg=#ebcb8b
hi TSProperty guifg=#8fbcbb gui=italic
hi TSRepeat guifg=#88c0d0
hi TSTypeBuiltin guifg=#81a1c1 gui=bold
hi TSVariableBuiltin guifg=#d08770 |
are you sure that this is according to the Nord color scheme? seems like this orange/ yellow is not from nord |
Yes. This is #ebcb8b - nord13. |
This theme is super cool, but with treesitter is not as good, leaves us 2 choices, stop using treesitter in order tu use this scheme, or don't use the scheme, which is not cool since treesitter is super fast even on very large files. |
How could I use this in my settings to work properly? I really like nord but with treesitter feels very plain imo. |
Checkout this plugin https://github.com/ChristianChiarulli/nvcode-color-schemes.vim , it has several colorschemes with support for treesitter (nord is among them). |
@luisiacc many thanks! |
@luisiacc @mrswats i have tried this one but it doesn’t have airline support and some colors were strange, so I merged official nord and this for treesitter, and I have those 2 files (colors its folder with colorschemes and airline contains nord and badwolf airline theme, you can delete badwolf) btw: to install them unarchive colors folder near your init.vim and airline In the autoload folder, and remove official packages from your config, because they will overwrite the custom theme |
@s-u-d-o-e-r Thank you for that. Could you open a PR upstream? |
its hand made merge and I know almost nothing about themes syntax, so it would be good if someone else will review and clean those files and then make PR |
@s-u-d-o-e-r I wish I had the time! |
I am happy to provide a PR if someone can give me some pointers! |
Sure thing. Clone the repository (it will appear under your own github), make the changes and commit then, then go to the upstream and do a PR. It might be good to open an issue first with a screen shot before and after -- I would add the after in the PR. I know there are some unit test framework for Does that help? |
@kierun I know how to create a PR for an OSS project on github. I meant it in a more technical sense, would committing these two files as @s-u-d-o-e-r sent them in the appropriate locations would be enough? |
@mrswats Ah, my apologies for misunderstanding. I would start with just replacing them and see what happens. |
Opened PR :) Feel free to continue the technical discussion over there! |
Hi to all participants in this issue 👋, and thanks @s-u-d-o-e-r for your contribution 👍 I know that the main development origin for tree-sitter was to be used as new parser for Atom back then, but when most of the users switched to the more stable and advanced Visual Studio Code (and Microsoft bought GitHub) I thought that Atom (and tree-sitter) was going to be sunset sooner or later. Nice to see that it was decoupled from Atom and developed actively. |
Any updates on this issue? |
@brymer-meneses I hadn't had much time to look into it since. I will try to check it out soon. |
This project is a tree-sitter implementation of Nord. It might not be compatible with Nord as-is but might be of interest. |
Hi, thanks for linking my port! I've tried to stay to Nord and followed the directions in the readme in terms of syntax groups. All colors used in the port are part of the 16 colors present in the nord theme, except for the cursor line color which is taken from the vscode version. The main changes I made were yellow (nord13) instead of Snow White (Nord 4) for constants, and light blue (Nord 7) instead of Snow White (Nord 4) for function names, as I feel it gives a little more pop to the theme. The biggest difference is my theme is made in lua, which means it isn't backwards compatible with Nord-vim. Ideally I wanted to submit it as a separate Nord port for Neovim, but if tree sitter is integrated into the main repository it's somewhat unnecessary. You can find my issue/request to create a neovim theme here: nordtheme/nord#157, since work is being done on this branch, I can close it if needed. The benefits of having neovim have its own theme are:
On the other hand, the main drawback would be having to maintain two themes instead of just one, and the nord theme has quite a backlog of work already. If you want a slightly more color-accurate theme, then https://github.com/kunzaatko/nord.nvim might interest you as well |
Neovim version 0.5 [1] is a long-time awaited update that introduces features like tree-sitter [2][3] support and native LSP [4][5]. Even though Neovim devides more and more from Vim through specific features like first-class Lua support with custom APIs, the highlighting for tree-sitter is achived through "normal" syntax highlighting groups. Most of the groups are already linked by the nvim-treesitter plugin by default [6] so only a few groups have been adjuated for now to fit the Nord style. [1]: https://github.com/neovim/neovim/releases/tag/v0.5.0 [2]: https://github.com/tree-sitter/tree-sitter [3]: https://github.com/nvim-treesitter/nvim-treesitter [4]: https://neovim.io/doc/user/lsp.html [5]: https://github.com/neovim/nvim-lspconfig [6]: https://github.com/nvim-treesitter/nvim-treesitter/blob/90f15d9/plugin/nvim-treesitter.vim Co-authored-by: Ferran Jovell <ferran.jovell@gmail.com> Co-authored-by: Arctic Ice Studio <development@arcticicestudio.com> Co-authored-by: Sven Greb <development@svengreb.de> Closes GH-235
Support has been implemented and merged in #253 🎉 |
Neovim version 0.5 [1] is a long-time awaited update that introduces features like tree-sitter [2][3] support and native LSP [4][5]. Even though Neovim devides more and more from Vim through specific features like first-class Lua support with custom APIs, the highlighting for tree-sitter is achived through "normal" syntax highlighting groups. Most of the groups are already linked by the nvim-treesitter plugin by default [6] so only a few groups have been adjuated for now to fit the Nord style. [1]: https://github.com/neovim/neovim/releases/tag/v0.5.0 [2]: https://github.com/tree-sitter/tree-sitter [3]: https://github.com/nvim-treesitter/nvim-treesitter [4]: https://neovim.io/doc/user/lsp.html [5]: https://github.com/neovim/nvim-lspconfig [6]: https://github.com/nvim-treesitter/nvim-treesitter/blob/90f15d9/plugin/nvim-treesitter.vim Co-authored-by: Ferran Jovell <ferran.jovell@gmail.com> Co-authored-by: Arctic Ice Studio <development@arcticicestudio.com> Co-authored-by: Sven Greb <development@svengreb.de> Closes GH-235
Neovim version 0.5 [1] is a long-time awaited update that introduces features like tree-sitter [2][3] support and native LSP [4][5]. Even though Neovim devides more and more from Vim through specific features like first-class Lua support with custom APIs, the highlighting for tree-sitter is achived through "normal" syntax highlighting groups. Most of the groups are already linked by the nvim-treesitter plugin by default [6] so only a few groups have been adjuated for now to fit the Nord style. [1]: https://github.com/neovim/neovim/releases/tag/v0.5.0 [2]: https://github.com/tree-sitter/tree-sitter [3]: https://github.com/nvim-treesitter/nvim-treesitter [4]: https://neovim.io/doc/user/lsp.html [5]: https://github.com/neovim/nvim-lspconfig [6]: https://github.com/nvim-treesitter/nvim-treesitter/blob/90f15d9/plugin/nvim-treesitter.vim Co-authored-by: Ferran Jovell <ferran.jovell@gmail.com> Co-authored-by: Arctic Ice Studio <development@arcticicestudio.com> Co-authored-by: Sven Greb <development@svengreb.de> Closes nordthemeGH-235
I like this theme but It would be even better with Treesitter support.
Treesitter defines the following highlight groups (the color definitions are from Onedark).
hi! TSError ctermfg=203 guifg=#f44747
hi! TSPunctDelimiter ctermfg=249 guifg=#abb2bf
hi! TSPunctBracket ctermfg=249 guifg=#abb2bf
hi! TSPunctSpecial ctermfg=249 guifg=#abb2bf
hi! TSConstant ctermfg=75 guifg=#61afef
hi! TSConstBuiltin ctermfg=173 guifg=#d19a66
hi! TSConstMacro ctermfg=73 guifg=#56b6c2
hi! TSStringRegex ctermfg=114 guifg=#98c379
hi! TSString ctermfg=114 guifg=#98c379
hi! TSStringEscape ctermfg=73 guifg=#56b6c2
hi! TSCharacter ctermfg=114 guifg=#98c379
hi! TSNumber ctermfg=173 guifg=#d19a66
hi! TSBoolean ctermfg=173 guifg=#d19a66
hi! TSFloat ctermfg=114 guifg=#98c379
hi! TSAnnotation ctermfg=180 guifg=#e5c07b
hi! TSAttribute ctermfg=73 guifg=#56b6c2
hi! TSNamespace ctermfg=201 guifg=#ff00ff
hi! TSFuncBuiltin ctermfg=75 guifg=#61afef
hi! TSFunction ctermfg=75 guifg=#61afef
hi! TSFuncMacro ctermfg=180 guifg=#e5c07b
hi! TSParameter ctermfg=73 guifg=#56b6c2
hi! TSParameterReference ctermfg=73 guifg=#56b6c2
hi! TSMethod ctermfg=75 guifg=#61afef
hi! TSField ctermfg=168 guifg=#e06c75
hi! TSProperty ctermfg=180 guifg=#e5c07b
hi! TSConstructor ctermfg=73 guifg=#56b6c2
hi! TSConditional ctermfg=175 guifg=#c586c0
hi! TSRepeat ctermfg=175 guifg=#c586c0
hi! TSLabel ctermfg=75 guifg=#61afef
hi! TSKeyword ctermfg=175 guifg=#c586c0
hi! TSKeywordFunction ctermfg=175 guifg=#c586c0
hi! TSKeywordOperator ctermfg=175 guifg=#c586c0
hi! TSOperator ctermfg=249 guifg=#abb2bf
hi! TSException ctermfg=175 guifg=#c586c0
hi! TSType ctermfg=75 guifg=#61afef
hi! TSTypeBuiltin ctermfg=75 guifg=#61afef
hi! TSStructure ctermfg=201 guifg=#ff00ff
hi! TSInclude ctermfg=175 guifg=#c586c0
hi! TSVariable ctermfg=73 guifg=#56b6c2
hi! TSVariableBuiltin ctermfg=180 guifg=#e5c07b
hi! TSText ctermfg=226 guifg=#ffff00
hi! TSStrong ctermfg=226 guifg=#ffff00
hi! TSEmphasis ctermfg=226 guifg=#ffff00
hi! TSUnderline ctermfg=226 guifg=#ffff00
hi! TSTitle ctermfg=226 guifg=#ffff00
hi! TSLiteral ctermfg=226 guifg=#ffff00
hi! TSURI ctermfg=226 guifg=#ffff00
hi! TSTag ctermfg=168 guifg=#e06c75
hi! TSTagDelimiter ctermfg=241 guifg=#5c6370
The text was updated successfully, but these errors were encountered: