diff options
author | Juan J. Martinez <jjm@usebox.net> | 2022-03-02 07:24:22 +0000 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2022-05-29 22:57:31 +0100 |
commit | 0790233d1ea38eb37a134e9ca620b2d989a75c80 (patch) | |
tree | 5c2aaa8222f27dd93a7a52e8beb82521172bed5b | |
parent | 0a932e8f8047864d5b901cd1ccf889b67ae3e73f (diff) | |
download | dotnvim-0790233d1ea38eb37a134e9ca620b2d989a75c80.tar.gz dotnvim-0790233d1ea38eb37a134e9ca620b2d989a75c80.zip |
Treesitter support
-rw-r--r-- | init.vim | 1 | ||||
-rw-r--r-- | treesitter.lua | 16 | ||||
-rw-r--r-- | vimrc | 1 |
3 files changed, 18 insertions, 0 deletions
@@ -8,6 +8,7 @@ source ~/.vimrc " general if has('nvim-0.6.1') source ~/.vim/lsp.lua + source ~/.vim/treesitter.lua end " scala and metals diff --git a/treesitter.lua b/treesitter.lua new file mode 100644 index 0000000..76665bd --- /dev/null +++ b/treesitter.lua @@ -0,0 +1,16 @@ +-- syntax highlighting via treesitter +-- +-- use :TSInstall <lang> to install languages +-- +-- go, scala, c, python, ... +-- +require'nvim-treesitter.configs'.setup { + highlight = { + enable = true, + -- Setting this to true will run `:h syntax` and tree-sitter at the same time. + -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). + -- 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, + }, +} @@ -82,6 +82,7 @@ end if has('nvim-0.6.1') " lsp Plug 'neovim/nvim-lspconfig' + Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} end call plug#end() |