50 lines
1.1 KiB
Lua
50 lines
1.1 KiB
Lua
return {
|
|
"nvim-treesitter/nvim-treesitter",
|
|
build = ":TSUpdate",
|
|
config = function()
|
|
local treesitter = require("nvim-treesitter.configs")
|
|
|
|
-- configuration de treesitter
|
|
treesitter.setup({
|
|
-- activation de la coloration syntaxique
|
|
highlight = {
|
|
enable = true,
|
|
},
|
|
-- activation de l'indentation améliorée
|
|
indent = { enable = true },
|
|
|
|
-- langages installés et configurés
|
|
ensure_installed = {
|
|
"c",
|
|
"bash",
|
|
"dockerfile",
|
|
"gitignore",
|
|
"html",
|
|
"javascript",
|
|
"json",
|
|
"lua",
|
|
"markdown",
|
|
"markdown_inline",
|
|
"python",
|
|
"rst",
|
|
"rust",
|
|
"typescript",
|
|
"vim",
|
|
"yaml",
|
|
},
|
|
-- lorse de l'appui sur <Ctrl-space> sélectionne le bloc
|
|
-- courant spécifique au langage de programmation
|
|
incremental_selection = {
|
|
enable = true,
|
|
keymaps = {
|
|
init_selection = "<C-space>",
|
|
node_incremental = "<C-space>",
|
|
scope_incremental = false,
|
|
node_decremental = "<bs>",
|
|
},
|
|
},
|
|
})
|
|
end,
|
|
}
|
|
|