From 7112fed7fe22811ede973b0c95bd9b8442752674 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 4 Dec 2021 12:33:24 +0900 Subject: neovim: install nvim-treesitter --- .config/nvim/init.lua | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) (limited to '.config/nvim/init.lua') diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 135550f..593779d 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -349,6 +349,8 @@ paq({ 'Yggdroot/indentLine', -- Highlight matched parentheses. 'itchyny/vim-parenmatch', + -- Tree-sitter integration. + 'nvim-treesitter/nvim-treesitter', -- Highlight specified words. 't9md/vim-quickhl', -- Filetypes {{{2 @@ -1956,6 +1958,33 @@ vimrc.map_plug('x', 'i', '(textobj-wiw-i)') +-- nvim-treesitter {{{2 + +require('nvim-treesitter.configs').setup { + ensure_installed = 'maintained', + sync_install = false, + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, + --[[ + incremental_selection = { + enable = true, + keymaps = { + init_selection = 'TODO', + node_incremental = 'TODO', + scope_incremental = 'TODO', + node_decremental = 'TODO', + }, + }, + --]] + indent = { + enable = true, + }, +} + + + -- window-adjuster {{{2 vimrc.map('n', 'tRw', ':AdjustScreenWidth', { silent = true }) @@ -1970,8 +1999,3 @@ vimrc.map('n', 'tRr', ':AdjustScreenWidth AdjustScreenHeight', { G.yankround_dir = my_env.yankround_dir G.yankround_use_region_hl = true - - - - - -- cgit v1.2.3-70-g09d2