summaryrefslogtreecommitdiff
path: root/init.vim
diff options
context:
space:
mode:
authorlistout <listout@protonmail.com>2022-04-25 14:10:02 +0530
committerlistout <listout@protonmail.com>2022-04-25 14:10:02 +0530
commite2512e5ecef9b3d001c1f17d42a1ddbaf3719d7b (patch)
tree4fff3baeaf2fe47119165f2ce4f1f770cfb186f7 /init.vim
parent8c93ac41ccd764d7d2bd128b8db872314f5ab56b (diff)
config: nvim: init: Tressiter config
Signed-off-by: listout <listout@protonmail.com>
Diffstat (limited to 'init.vim')
-rw-r--r--init.vim35
1 files changed, 35 insertions, 0 deletions
diff --git a/init.vim b/init.vim
index 460ad50..7bc70ce 100644
--- a/init.vim
+++ b/init.vim
@@ -50,6 +50,12 @@ augroup END
autocmd BufEnter,BufNewFile,BufFilePre,BufRead *.md :syntax sync fromstart
autocmd BufEnter * :syntax sync fromstart
+if &diff
+source $HOME/.config/nvim/configs/plugins.vim
+source $HOME/.config/nvim/configs/basic.vim
+source $HOME/.config/nvim/configs/appearance.vim
+source $HOME/.config/nvim/configs/statusline.vim
+else
source $HOME/.config/nvim/configs/plugins.vim
source $HOME/.config/nvim/configs/basic.vim
source $HOME/.config/nvim/configs/appearance.vim
@@ -58,6 +64,35 @@ source $HOME/.config/nvim/configs/coc.vim
source $HOME/.config/nvim/configs/snippets.vim
source $HOME/.config/nvim/configs/keys.vim
source $HOME/.config/nvim/configs/fzf.vim
+endif
+
+lua <<EOF
+require'nvim-treesitter.configs'.setup {
+ -- A list of parser names, or "all"
+ ensure_installed = { "c", "cpp", "vim" },
+
+ -- Install parsers synchronously (only applied to `ensure_installed`)
+ sync_install = false,
+
+
+ highlight = {
+ -- `false` will disable the whole extension
+ enable = true,
+
+ -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
+ -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
+ -- the name of the parser)
+ -- list of language that will be disabled
+ -- disable = { "c", "rust" },
+
+ -- 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,
+ },
+}
+EOF
let g:AutoPairsCenterLine = 0
let g:AutoPairsMapSpace = 0