So a common pattern I use when lazy.nvim and other plugins is to split the config into multiple files and lazy.nvim will merge it before calling setup.
For example in general.lua:
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"bash",
"vimdoc",
"diff",
"html",
"http",
"gitignore",
}}
}
And then in go.lua:
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed, {
"go",
"gomod",
"gowork",
"gosum",
"templ",
})
end,
}
How do I achieve the same thing in guard.nvim? I tried to make a _G.guard_filetypes = {} and append it in each fine but it doesn't work.
So a common pattern I use when
lazy.nvimand other plugins is to split the config into multiple files andlazy.nvimwill merge it before calling setup.For example in
general.lua:{ "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = { "bash", "vimdoc", "diff", "html", "http", "gitignore", }} }And then in
go.lua:{ "nvim-treesitter/nvim-treesitter", opts = function(_, opts) vim.list_extend(opts.ensure_installed, { "go", "gomod", "gowork", "gosum", "templ", }) end, }How do I achieve the same thing in
guard.nvim? I tried to make a_G.guard_filetypes = {}and append it in each fine but it doesn't work.