I just switched - or tried to - from Vim-Plug to Lazy. I thought this should not be too complicated. It turned out I was completely wrong. I am already trying to figure out for hours why some plugins just don't get loaded.
I don't want to paste the entire configuration (the entire configuration is huge) but some of the relevant part is within the setup of lazy:
require ('lazy').setup ({
...
{
'neovim/nvim-lspconfig',
config = function () require 'config.lsp-config-conf' end
},
{
'p00f/clangd_extensions.nvim', -- !! THIS DOES NOT GET LOADED !!
dependencies = {'neovim/nvim-lspconfig'},
config = function () require 'config.clangd-extensions' end,
},
...
})
My setup was working with Vim-Plug for quite some time - there are no changes in those configurations and if I switch back to Vim-Plug (I am doing this in another branch so I can jump back and forth) everything works again.
I am completely puzzled - I've read the quickstart and introduction up and down, absolutely nothing points me to the problem.
Does anyone have an idea where to start, why is the plugin clangd_extensions
not loaded/not active?
I even just realized that my lsp configuration does not work either, there is very awkward different behavior in my on_attach
- it seems that part of the function is not executed (keymaps I setup work but vim.lsp.buf.document_highlight
does not work - or lsp behaves different - depending on a package manager? 😜).
To be precise: When I switch my repo back to Vim-Plug, this behavior is not reproducible, everything works as expected. As soon as I use lazy things do not work anymore.
When I enter :Lazy
I can see all the plugins listed. I can see the time consumed loading for every plugin - but the plugins (or just some) are not loaded. E.g. clangd_extensions
defines a command :ClangdSwitchSourceHeader
, the command does not exist when I use lazy. It does exist when I load the plugin with Vim-Plug.
It also does not change anything if I manually hit :Lazy load clangd_extensions.nvim
, nothing happens.
Or is it simply that the plugin is not compatible with lazy?... Or do I have to do something after setup
?
I have read the documentation up and down, I could not find any hint about anything else needed besides setup. I tried by setting the attribute lazy
to false, nothing I tried had any notable effect.
lazy/lualine.lua
, after I renamed the file tolazy/nvim-lualine.lua
(the repository name is nvim-lualine) then it finally appeared in the install list in:Lazy
. – Glennieglennis