Add treesitter plugin

This commit is contained in:
pro100ton 2025-01-31 22:58:20 +03:00
parent 66fa89277e
commit db10325c97
2 changed files with 31 additions and 0 deletions

View file

@ -0,0 +1,14 @@
return {
"nvim-treesitter/nvim-treesitter",
-- open this plugin on two events:
-- BufReadPre - open existing file
-- BufNewFile - open new file
event = { "BufReadPre", "BufNewFile" },
build = ":TSUpdate", -- Run whenever this plugin is installed or updated
dependencies = {
"windwp/nvim-ts-autotag", -- Auto-closing functionality within treesitter
},
config = function()
require "custom/treesitter"
end,
}

17
lua/custom/treesitter.lua Normal file
View file

@ -0,0 +1,17 @@
require'nvim-treesitter.configs'.setup {
ensure_installed = {
"python",
"lua",
"vim",
"vimdoc",
"query",
"elixir",
"heex",
"javascript",
"html",
"go"
},
sync_install = false,
highlight = { enable = true },
indent = { enable = true },
}