38 lines
817 B
Lua
38 lines
817 B
Lua
return {
|
|
"nvim-treesitter/nvim-treesitter",
|
|
build = ":TSUpdate",
|
|
event = { "BufReadPost", "BufNewFile" },
|
|
dependencies = {
|
|
"nvim-treesitter/nvim-treesitter-textobjects",
|
|
},
|
|
config = function()
|
|
require("nvim-treesitter.configs").setup({
|
|
ensure_installed = {
|
|
"lua",
|
|
"vim",
|
|
"vimdoc",
|
|
"javascript",
|
|
"typescript",
|
|
"python",
|
|
"go",
|
|
-- add other languages you need
|
|
},
|
|
highlight = {
|
|
enable = true,
|
|
},
|
|
indent = {
|
|
enable = true,
|
|
},
|
|
incremental_selection = {
|
|
enable = true,
|
|
keymaps = {
|
|
init_selection = "<CR>",
|
|
node_incremental = "<CR>",
|
|
scope_incremental = "<S-CR>",
|
|
node_decremental = "<BS>",
|
|
},
|
|
},
|
|
})
|
|
end,
|
|
}
|