Add treesitter and incremental selection to vscode

This commit is contained in:
Eric Tiedemann 2023-11-28 10:54:52 -05:00
parent 2f0c183557
commit 7e31e79d6a
1 changed files with 22 additions and 0 deletions

View File

@ -11,8 +11,30 @@ if not vim.loop.fs_stat(lazypath) then
end end
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)
require('lazy').setup({ require('lazy').setup({
{
'nvim-treesitter',
dependencies = {
'nvim-treesitter-textobjects',
},
build = ':TSUpdate',
},
{ {
'kylechui/nvim-surround', 'kylechui/nvim-surround',
opts = { config = {} } opts = { config = {} }
} }
}) })
require('nvim-treesitter.configs').setup({
ensure_installed = { 'go', 'python', 'rust', 'javascript', 'typescript' },
auto_install = true,
highlight = { enable = true },
incremental_selection = {
enable = true,
keymaps = {
init_selection = '<CR>',
node_incremental = '<CR>',
scope_incremental = '<TAB>',
node_decremental = '<BS>',
}
}
})