From 93e2c049a2d7f68cf68732ed17b901ad51fb99df Mon Sep 17 00:00:00 2001 From: Ferran Jovell <3410779+mrswats@users.noreply.github.com> Date: Sat, 10 Jul 2021 12:24:11 +0200 Subject: [PATCH] Add support for nvim-treesitter/nvim-treesitter (#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 Co-authored-by: Arctic Ice Studio Co-authored-by: Sven Greb Closes GH-235 --- colors/nord.vim | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/colors/nord.vim b/colors/nord.vim index d1c60e61..2db1d9c4 100755 --- a/colors/nord.vim +++ b/colors/nord.vim @@ -277,6 +277,7 @@ call s:hi("Comment", s:nord3_gui_bright, "", s:nord3_term, "", s:italicize_comme call s:hi("Conceal", "", "NONE", "", "NONE", "", "") call s:hi("Conditional", s:nord9_gui, "", s:nord9_term, "", "", "") call s:hi("Constant", s:nord4_gui, "", "NONE", "", "", "") +call s:hi("Decorator", s:nord12_gui, "", s:nord12_term, "", "", "") call s:hi("Define", s:nord9_gui, "", s:nord9_term, "", "", "") call s:hi("Delimiter", s:nord6_gui, "", s:nord6_term, "", "", "") call s:hi("Exception", s:nord9_gui, "", s:nord9_term, "", "", "") @@ -301,8 +302,10 @@ call s:hi("Tag", s:nord4_gui, "", "", "", "", "") call s:hi("Todo", s:nord13_gui, "NONE", s:nord13_term, "NONE", "", "") call s:hi("Type", s:nord9_gui, "", s:nord9_term, "", "NONE", "") call s:hi("Typedef", s:nord9_gui, "", s:nord9_term, "", "", "") +hi! link Annotation Decorator hi! link Macro Define hi! link PreCondit PreProc +hi! link Variable Identifier "+-----------+ " treesitter + @@ -757,6 +760,25 @@ hi! link jsNoise Delimiter hi! link jsPrototype Keyword hi! link jsRegexpString SpecialChar +" tree-sitter +" > nvim-treesitter/nvim-treesitter +if has("nvim") + hi! link TSAnnotation Annotation + hi! link TSConstBuiltin Constant + hi! link TSConstructor Function + hi! link TSEmphasis Italic + hi! link TSError Error + hi! link TSFuncBuiltin Function + hi! link TSFuncMacro Function + hi! link TSStringRegex SpecialChar + hi! link TSStrong Bold + hi! link TSStructure Structure + hi! link TSTagDelimiter TSTag + hi! link TSUnderline Underline + hi! link TSVariable Variable + hi! link TSVariableBuiltin Keyword +endif + " TypeScript " > HerringtonDarkholme/yats.vim call s:hi("typescriptBOMWindowMethod", s:nord8_gui, "", s:nord8_term, "", s:italic, "")