76 lines
1.2 KiB
Lua
76 lines
1.2 KiB
Lua
require("nvim-treesitter.configs").setup({
|
|
ensure_installed = {
|
|
"bash",
|
|
"c",
|
|
"cmake",
|
|
"cpp",
|
|
"css",
|
|
"dockerfile",
|
|
"glsl",
|
|
"graphql",
|
|
"haskell",
|
|
"http",
|
|
"html",
|
|
"java",
|
|
"javascript",
|
|
"jsdoc",
|
|
"json",
|
|
"json5",
|
|
"latex",
|
|
"lua",
|
|
"markdown",
|
|
"ninja",
|
|
"nix",
|
|
"org",
|
|
"perl",
|
|
"php",
|
|
"pug",
|
|
"python",
|
|
"regex",
|
|
"rst",
|
|
"ruby",
|
|
"rust",
|
|
"scala",
|
|
"scss",
|
|
"toml",
|
|
"tsx",
|
|
"typescript",
|
|
"vim",
|
|
"yaml",
|
|
"zig"
|
|
},
|
|
ignore_install = {},
|
|
highlight = {
|
|
enable = true,
|
|
disable = {},
|
|
},
|
|
indent = { enable = true },
|
|
incremental_selection = {
|
|
enable = true,
|
|
keymaps = {
|
|
init_selection = "gnn",
|
|
node_incremental = "grn",
|
|
scope_incremental = "grc",
|
|
node_decremental = "grm",
|
|
},
|
|
},
|
|
-- Extensions
|
|
autotag = { enable = true },
|
|
context_commentstring = { enable = true },
|
|
matchup = { enable = true },
|
|
rainbow = { enable = true },
|
|
textobjects = {
|
|
select = {
|
|
enable = true,
|
|
keymaps = {
|
|
["af"] = "@function.outer",
|
|
["if"] = "@function.inner",
|
|
},
|
|
},
|
|
},
|
|
})
|
|
|
|
vim.opt.foldmethod = "expr"
|
|
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
|
|