From 7e31e79d6ad8963620ec9ac34d20e3464c0b6018 Mon Sep 17 00:00:00 2001 From: Eric Tiedemann Date: Tue, 28 Nov 2023 10:54:52 -0500 Subject: [PATCH] Add treesitter and incremental selection to vscode --- lua/vscode-plugins.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lua/vscode-plugins.lua b/lua/vscode-plugins.lua index 812f2278..4bbc7726 100644 --- a/lua/vscode-plugins.lua +++ b/lua/vscode-plugins.lua @@ -11,8 +11,30 @@ if not vim.loop.fs_stat(lazypath) then end vim.opt.rtp:prepend(lazypath) require('lazy').setup({ + { + 'nvim-treesitter', + dependencies = { + 'nvim-treesitter-textobjects', + }, + build = ':TSUpdate', + }, { 'kylechui/nvim-surround', 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 = '', + node_incremental = '', + scope_incremental = '', + node_decremental = '', + } + } +})