diff options
| -rw-r--r-- | nvim/ftplugin/c.vim | 3 | ||||
| -rw-r--r-- | nvim/ftplugin/html.vim | 3 | ||||
| -rw-r--r-- | nvim/plugins.vim | 17 |
3 files changed, 21 insertions, 2 deletions
diff --git a/nvim/ftplugin/c.vim b/nvim/ftplugin/c.vim index e0c347d..fd45dbd 100644 --- a/nvim/ftplugin/c.vim +++ b/nvim/ftplugin/c.vim | |||
| @@ -4,4 +4,5 @@ setlocal formatoptions=tcqr | |||
| 4 | setlocal cindent | 4 | setlocal cindent |
| 5 | 5 | ||
| 6 | setlocal foldenable | 6 | setlocal foldenable |
| 7 | setlocal foldmethod=syntax | 7 | setlocal foldmethod=expr |
| 8 | setlocal foldexpr=nvim_treesitter#foldexpr() | ||
diff --git a/nvim/ftplugin/html.vim b/nvim/ftplugin/html.vim index fced505..fe513b6 100644 --- a/nvim/ftplugin/html.vim +++ b/nvim/ftplugin/html.vim | |||
| @@ -6,7 +6,8 @@ setlocal expandtab | |||
| 6 | setlocal autoindent | 6 | setlocal autoindent |
| 7 | 7 | ||
| 8 | setlocal foldenable | 8 | setlocal foldenable |
| 9 | setlocal foldmethod=indent | 9 | setlocal foldmethod=expr |
| 10 | setlocal foldexpr=nvim_treesitter#foldexpr() | ||
| 10 | 11 | ||
| 11 | let g:html_indent_script1='inc' | 12 | let g:html_indent_script1='inc' |
| 12 | let g:html_indent_style1='inc' | 13 | let g:html_indent_style1='inc' |
diff --git a/nvim/plugins.vim b/nvim/plugins.vim index 4c0d9a0..1386eca 100644 --- a/nvim/plugins.vim +++ b/nvim/plugins.vim | |||
| @@ -16,6 +16,7 @@ call plug#begin() | |||
| 16 | Plug 'simnalamburt/vim-mundo' | 16 | Plug 'simnalamburt/vim-mundo' |
| 17 | Plug 'tpope/vim-repeat' | 17 | Plug 'tpope/vim-repeat' |
| 18 | Plug 'tpope/vim-surround' | 18 | Plug 'tpope/vim-surround' |
| 19 | Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} | ||
| 19 | call plug#end() | 20 | call plug#end() |
| 20 | 21 | ||
| 21 | " EMMET | 22 | " EMMET |
| @@ -48,3 +49,19 @@ let g:mundo_preview_height=30 | |||
| 48 | " Autopairs | 49 | " Autopairs |
| 49 | let b:autopairs_enabled=1 | 50 | let b:autopairs_enabled=1 |
| 50 | 51 | ||
| 52 | " Treesitter | ||
| 53 | lua << EOF | ||
| 54 | require'nvim-treesitter.configs'.setup { | ||
| 55 | ensure_installed = { "c", "lua", "vim", "vimdoc", "typescript" }, | ||
| 56 | sync_install = false, | ||
| 57 | auto_install = false, | ||
| 58 | highlight = { | ||
| 59 | enable = true, | ||
| 60 | disable = { "html" }, | ||
| 61 | additional_vim_regex_highlighting = true, | ||
| 62 | }, | ||
| 63 | indent = { | ||
| 64 | enable = false, | ||
| 65 | }, | ||
| 66 | } | ||
| 67 | EOF | ||
