Skip to content

Ability to split config into multiple files #159

@vunhatchuong

Description

@vunhatchuong

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions