Add treesitter plugin
This commit is contained in:
parent
66fa89277e
commit
db10325c97
2 changed files with 31 additions and 0 deletions
14
lua/custom/plugins/treesitter.lua
Normal file
14
lua/custom/plugins/treesitter.lua
Normal 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
17
lua/custom/treesitter.lua
Normal 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 },
|
||||
}
|
Loading…
Reference in a new issue