Skip to content

Commit 2dcb5f0

Browse files
committed
-+ nvim : use treesitter for neato advanced language features
1 parent 6fb080b commit 2dcb5f0

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

dot_config/nvim/init.vim.tmpl

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ if dein#load_state('~/.cache/dein/')
3232

3333
" Engines, code style:
3434

35+
" use treesitter for language features
36+
call dein#add('nvim-treesitter/nvim-treesitter', {'hook_post_update': 'TSUpdate'})
37+
3538
" deoplete for nvim
3639
call dein#add('Shougo/deoplete.nvim')
3740
call dein#add('zchee/deoplete-clang')
@@ -169,7 +172,6 @@ endif
169172

170173
" Required:
171174
filetype plugin indent on
172-
syntax enable
173175

174176
" If you want to install not installed plugins on startup.
175177
" (Annoying when you're testing lots of different plugins)
@@ -400,6 +402,32 @@ augroup end
400402
"""
401403

402404

405+
" treesitter
406+
lua <<EOF
407+
require'nvim-treesitter.configs'.setup {
408+
-- "all" | "maintainers" | {"list of languages"}
409+
ensure_installed = "maintained",
410+
sync_install = false,
411+
412+
highlight = {
413+
enable = true,
414+
disable = {},
415+
additional_vim_regex_highlighting = false,
416+
},
417+
418+
incremental_selection = {
419+
-- default keymaps: init / node inc / scope inc / node dec
420+
-- gnn / grn / grc / grm
421+
enable = true,
422+
},
423+
424+
indent = {
425+
enable = true,
426+
}
427+
}
428+
EOF
429+
430+
403431
" gitsigns
404432
lua require('gitsigns').setup({
405433
\ numhl = true,

0 commit comments

Comments
 (0)