new config using vim.pack

This commit is contained in:
Dario48 2026-03-31 21:49:56 +02:00
commit 17fda33a90
52 changed files with 629 additions and 659 deletions

View file

@ -1,24 +1,20 @@
---@module "utils.plugins"
---@type Plugin
return {
"nvim-treesitter/nvim-treesitter",
opts = {
-- A list of parser names, or "all" (the listed parsers MUST always be installed)
ensure_installed = { "c", "lua", "vim", "vimdoc", "query" },
configures = "nvim-treesitter",
configure = function(load)
load("nvim-treesitter/nvim-treesitter")
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = true,
require("nvim-treesitter").install({ "c", "lua", "vim", "vimdoc", "query" }):wait(300000)
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = false,
-- List of parsers to ignore installing (or "all")
---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
highlight = { enable = true },
},
config = function(_, opts)
require("nvim-treesitter.configs").setup(opts)
vim.api.nvim_create_autocmd("FileType", {
pattern = require("nvim-treesitter").get_installed(),
callback = function()
vim.treesitter.start()
end,
})
end,
onUpdate = function()
vim.cmd("TSUpdate")
end,
version = "*",
}