plugins: Add vim-treesitter
[vimconf.git] / init.vim
index 80b80ee612d7c43541ade42879e4ce35f7e35cef..fbdb9aaa1107c67ff63c88cd5986d43dc1d234fd 100644 (file)
--- a/init.vim
+++ b/init.vim
@@ -177,6 +177,8 @@ au BufEnter *.cpp,*.cc,*.cxx let b:fswitchdst='h,hxx,hpp,hh'
 au BufEnter *.h,*.hh,*.hxx let b:fswitchdst='cc,c,cxx,cpp'
 au BufNewFile *.{h,hpp,hxx} call AddIncludeGuards()
 
+au FileType cpp,c packadd termdebug
+
 augroup autofoldcolumn
   au!
   au CursorHold,BufWinEnter * AutoOrigamiFoldColumn
@@ -306,6 +308,28 @@ let s:normal_mode_mappings = [
 let g:termdebug_wide = 1
 let termdebugger = $HOME . '/.vim/gdb.sh'
 
+if has('nvim-0.5')
+lua <<EOF
+    require'nvim-treesitter.configs'.setup {
+        -- one of "all", "maintained" (parsers with maintainers), or a list of languages
+        ensure_installed = "maintained",
+        -- List of parsers to ignore installing
+        ignore_install = { },
+        -- Modules and its options go here
+        highlight = {
+          enable = true,
+          disabled = {}
+        },
+        incremental_selection = {
+          enable = true
+        },
+        textobjects = {
+          enable = true
+        }
+  }
+EOF
+endif
+
 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
 runtime keymaps.vim