From 06a0ac7cc423f06ab14a1806f2c7a8325cbb817c Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Tue, 6 Dec 2022 18:15:06 -0800 Subject: [PATCH] update vim colors for TreeSitter --- .vim/nvim.lua | 10 ++++------ .vimrc | 4 ++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.vim/nvim.lua b/.vim/nvim.lua index 522e167..f31be04 100644 --- a/.vim/nvim.lua +++ b/.vim/nvim.lua @@ -375,6 +375,10 @@ require 'nvim-treesitter.configs'.setup { -- Using this option may slow down your editor, and you may see some duplicate highlights. -- Instead of true it can also be a list of languages additional_vim_regex_highlighting = false, + --custom_captures = { + --["generic_type_param"] = "TSCGenericTypeParam", + --["type_identifier"] = "TSCGenericTypeParam", + --}, }, indent = { @@ -401,12 +405,6 @@ require 'nvim-treesitter.configs'.setup { } } ---require "nvim-treesitter.highlight".set_custom_captures { ----- Highlight the @foo.bar capture group with the "Identifier" highlight group. ----- ["foo.bar"] = "Identifier", ---["generic_type_param"] = "TSCGenericTypeParam", ---} - require "neogen".setup {} require('leap').set_default_keymaps() diff --git a/.vimrc b/.vimrc index b4f5e7f..945e6a1 100644 --- a/.vimrc +++ b/.vimrc @@ -1068,3 +1068,7 @@ function! s:denite_my_settings() abort endfunction map :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">" + +" Final hi links for TreeSitter + +hi link @type.rust TSCSecondaryTypeParam