kickstart.nvim icon indicating copy to clipboard operation
kickstart.nvim copied to clipboard

Help with custom plugins / not loading

Open rogerneel opened this issue 2 years ago • 3 comments

I'm guessing the problem is on my end, but I can't seem to get a custom plugin loading. What I've done:

Uncommented import = 'custom.plugins', in lazy-plugins.lua

Edited custom/plugins/init.lua to be

return {
  require 'custom/plugins/supermaven'
}

(I also tried require 'supermaven' since the lua file is at the same level

Added file custom/plugins/supermaven.lua

return {
  {
    'supermaven-inc/supermaven-nvim',
    
    config = function()
      require('supermaven-nvim').setup({
        color = {
          suggestion_color = '#ffffff',
        }
      })
    end
  }
}

This config should be correct per the Supermaven docs here https://github.com/supermaven-inc/supermaven-nvim

I'm not able to see the plugin load in :Lazy

Thoughts or suggestions? Is there something I need to do to load custom plugins?

rogerneel avatar Jun 02 '24 16:06 rogerneel

If you uncommented this:

import = 'custom.plugins',

Then you don't need this:

return {
  require 'custom/plugins/supermaven'
}

It should load the custom/plugins/supermaven.lua automatically.

dam9000 avatar Jun 02 '24 17:06 dam9000

@dam9000 thanks for the response! I tried simply having the supermaven.lua file in the custom/plugins directory with nothing in init.lua other than return {} and unfortunately that still didn't load it.

As a sanity check, I moved supermaven.lua to the kickstart/plugins directory and added require 'kickstart/plugins/supermaven', to the lazy-plugins.lua file and neovim immediately loaded the plugin and things seem to be working.

Is there some way I can help debug why custom plugins are not loading?

rogerneel avatar Jun 03 '24 03:06 rogerneel

Well, good news! I got it working and it was a difference in my kickstart config.

I changed: import = 'custom.plugins', to: { import = 'custom.plugins' },

and it loaded!

I'm not sure why those curly braces are necessary, but it now seems to load plugins in the custom/plugins folder.

rogerneel avatar Jun 03 '24 03:06 rogerneel