35 lines
699 B
Lua
35 lines
699 B
Lua
local config = require("config").plugins.nvim_treesitter
|
|
local options = config.options
|
|
local mappings = config.mappings
|
|
|
|
return {
|
|
"nvim-treesitter/nvim-treesitter",
|
|
|
|
build = ":TSUpdate",
|
|
|
|
config = function()
|
|
local nvim_treesitter_configs = require("nvim-treesitter.configs")
|
|
|
|
nvim_treesitter_configs.setup({
|
|
ensure_installed = options.parsers,
|
|
|
|
highlight = {
|
|
enable = true
|
|
},
|
|
|
|
indent = {
|
|
enable = true
|
|
},
|
|
|
|
incremental_selection = {
|
|
enable = true,
|
|
keymaps = {
|
|
init_selection = mappings.start_selection,
|
|
node_incremental = mappings.increment_selection,
|
|
node_decremental = mappings.decrement_selection
|
|
}
|
|
}
|
|
})
|
|
end
|
|
}
|