diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua new file mode 100644 index 0000000..d69c7ba --- /dev/null +++ b/lua/plugins/treesitter.lua @@ -0,0 +1,54 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + event = { + "BufReadPost", + "BufNewFile", + }, + dependencies = { + { "nvim-treesitter/nvim-treesitter-textobjects", }, + }, + keys = { + { "", desc = "Increment selection" }, + { "", desc = "Decrement selection", mode = "x" } + }, + opts = { + highlight = { + enable = true + }, + indent = { + enable = true + }, + ensure_installed = { + "bash", + "c", + "html", + "javascript", + "json", + "lua", + "luadoc", + "luap", + "markdown", + "markdown_inline", + "python", + "query", + "regex", + "tsx", + "typescript", + "vim", + "vimdoc", + "yaml", + }, + incremental_selection = { + enable = true, + keymaps = { + init_selection = "", + node_incremental = "", + scope_incremental = false, + node_decremental = "" + } + } + } + } +}