first commit
This commit is contained in:
49
lua/plugins/treesitter.lua
Normal file
49
lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,49 @@
|
||||
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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user