Files
neovim-config/lua/plugins/nvim-treesitter.lua

74 lines
1.6 KiB
Lua

return {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
local nvim_treesitter_configs = require("nvim-treesitter.configs")
nvim_treesitter_configs.setup({
ensure_installed = {
"angular",
"asm",
"bash",
"c",
"c_sharp",
"cmake",
"cpp",
"css",
"csv",
"dockerfile",
"gitignore",
"go",
"groovy",
"html",
"htmldjango",
"http",
"java",
"javascript",
"json",
"kotlin",
"lua",
"make",
"markdown",
"nginx",
"ocaml",
"odin",
"pascal",
"php",
"powershell",
"python",
"ruby",
"rust",
"scala",
"sql",
"toml",
"tsx",
"twig",
"typescript",
"vim",
"vue",
"xml",
"yaml"
},
highlight = {
enable = true
},
indent = {
enable = true
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<CR>", -- Commencer la sélection syntaxique
node_incremental = "<CR>", -- Agrandir la sélection syntaxique
node_decremental = "<BS>" -- Réduire la sélection syntaxique
}
}
})
end
}