miversen33 / sunglasses.nvim

Put on your shades so you only see what you care about
GNU General Public License v3.0
125 stars 3 forks source link

How to disable the plugin by default, only start when required #13

Closed LintaoAmons closed 9 months ago

LintaoAmons commented 9 months ago

image

Here's my current config, but it will start the sunglasses when I enter nvim.

So I actually want it do not take effect at the very beginning.

miversen33 commented 9 months ago

There isn't a "built in way" to accomplish this. You could just disable it immediately after setup though

{
    {
        "miversen33/sunglasses.nvim",
        config = function()
            local sunglasses_options = {
                filter_percent = 0.65,
                filter_type = "NOSYNTAX"
            },

            require("sunglasses").setup(sunglasses_options)
            vim.cmd(':SunglassesDisable')
        end
    }
}

Would that work? If not, I would be open to a PR adding some way of preventing the auto disabling of sunglasses :)

LintaoAmons commented 9 months ago

Thanks, yes, it works~