Skip to content

Commit

Permalink
Add support for nvim-treesitter/nvim-treesitter (#253)
Browse files Browse the repository at this point in the history
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 <[email protected]>
Co-authored-by: Arctic Ice Studio <[email protected]>
Co-authored-by: Sven Greb <[email protected]>

Closes GH-235
  • Loading branch information
mrswats authored Jul 10, 2021
1 parent 1380ad6 commit b3e712a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions colors/nord.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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, "", "", "")
Expand All @@ -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

"+-----------+
"+ Languages +
Expand Down Expand Up @@ -687,6 +690,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, "")
Expand Down

0 comments on commit b3e712a

Please sign in to comment.