chore: add treesitter

This commit is contained in:
Dinesh Salunke 2023-06-16 01:59:01 +05:30
parent c310df4642
commit 51bed5c7c8

View File

@ -0,0 +1,54 @@
return {
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
event = {
"BufReadPost",
"BufNewFile",
},
dependencies = {
{ "nvim-treesitter/nvim-treesitter-textobjects", },
},
keys = {
{ "<C-Space>", desc = "Increment selection" },
{ "<bs>", 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 = "<C-Space>",
node_incremental = "<C-Space>",
scope_incremental = false,
node_decremental = "<bs>"
}
}
}
}
}