feat(vim): auto install treesitter grammars

Previously we were defining what ones we want to install. Now we are say
we want to install the grammar when we go to a file. If we don't have
that grammar installed then we will install it then
This commit is contained in:
Ade Attwood 2024-04-10 19:17:42 +01:00
parent a1e089babb
commit b1746b0178

View file

@ -1,4 +1,5 @@
require("nvim-treesitter.configs").setup {
auto_install = true,
playground = { enable = true },
indent = { enable = false },
rainbow = { enable = true },
@ -7,13 +8,9 @@ require("nvim-treesitter.configs").setup {
enable = true,
additional_vim_regex_highlighting = true,
},
ensure_installed = {
"typescript",
"javascript",
"tsx",
"php",
"html",
"go",
"clojure",
},
}
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
vim.opt.foldenable = false