nvim-ide
nvim-ide copied to clipboard
No `:Workspace` command exposed?
👋🏻
Reading the docs it looks like I should see a bunch of panels displayed after the .setup()
is executed (that doesn't happen, no errors either), but also that a :Workspace
command should be exposed (but there isn't).
use {
"ldelossa/nvim-ide",
config = function()
require("ide").setup({
icon_set = "default",
panels = {
left = "explorer",
right = "git"
},
})
end
}
Try it without anything provided to "setup" at all?
I dont use Packer, but if you literally see nothing, I think this maybe a local issue, and not an issue with the plugin.
This is not exactly related since OP isn't doing it, but I did notice that if you lazy load with packer, the only lazy-loading mechanism that works is using the VimEnter
autocmd event, which kinda defeats the purpose of lazy loading.
Ideally I'd like to be able to lazy-load so that nvim-ide only loads when I issue the :Workspace
command, which you can do with packer like so:
use {
"ldelossa/nvim-ide",
cmd = 'Workspace',
module = 'ide', -- also load if anything tries to `require('ide')`
config = function()
require("ide").setup()
end
}
However when I set up like this, the :Workspace
command is not created and it doesn't seem to work at all.
I'm not sure what exactly the issue is but something about nvim-ide is incompatible with lazy-loading, which IMO is actually a kind of big problem because it is the largest contributor to my startup time. Before adding nvim-ide, it was about 60ms, now its about 110ms.
The setup function is pretty simple, it starts a "WorkspaceController" which then implements all the smarts. You can debug this. TBH, packer has always been a nightmare for me, with the caching and compiling just never working smoothly.
FYI my original issue is fixed and was a user error it seems (although I had recompiled packer, it didn't take effect until today -- honestly no idea why because I don't use any cache plugins like impatient.nvim anymore due to similar issues where caching was causing me problems seeing updated config).
So with this in mind should I close this issue and @mrjones2014 open a separate issue for the lazy loading problem, or would you prefer this issue kept open?
I think it makes more sense for me to open a new issue and we can discuss lazy loading specifically there.
I've opened a separate issue and PR to resolve the issue, this one can be closed.