supermaven-inc / supermaven-nvim

The official Neovim plugin for Supermaven
https://supermaven.com/
MIT License
279 stars 16 forks source link

Changing color does not work when Lazy loading #52

Open arnevm123 opened 3 weeks ago

arnevm123 commented 3 weeks ago

Hi, Currently when lazy loading the plugin the color does not get applied. This is because this is propagated by an autocommand.

Example config: (comment out -- lazy = false --> colorworks, commented out it does not.)

    {
        "supermaven-inc/supermaven-nvim",
        -- lazy = false,
        event = "VeryLazy",
        config = function()
            require("supermaven-nvim").setup({
                keymaps = {
                    accept_suggestion = "<C-;>",
                    clear_suggestion = "<C-/>",
                    accept_word = "<C-.>",
                },
                color = {
                    suggestion_color = "#ffffff",
                    cterm = 244,
                },
            })
        end,
    },

This could be easily fixed by adding an extra call to setup the colorscheme here: https://github.com/supermaven-inc/supermaven-nvim/blob/ef3bd1a6b6f722857f2f88d929dd4ac875655611/lua/supermaven-nvim/document_listener.lua#L43