-
Notifications
You must be signed in to change notification settings - Fork 317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: some simple plugins seem not to be successfully lazy-loaded via event = "…"
#190
Comments
https://github.com/rstacruz/vim-closer/blob/master/plugin/closer.vim sets up filetype autocmds, which would not trigger if you opened a file from the cmdline. so either add a |
Huh, that’s interesting. I can confirm that when opening a file via e.g. netrw, the plugins do work.
Is there any more documentations and/or examples on how to do this in general in some elegant way? Maybe it’s totally unnecessary to load such plugins lazily … I simply though that those plugins could be loaded later, as they are not necessary early on; maybe I was wrong on this. |
Those plugins are simply not built to be lazy-loaded it seems. Most modern plugins would check existing buffers when loading, but the ones here don't. |
You could try loading them with |
Indeed, Thank you for taking the time to read through and look into this. |
Did you check docs and existing issues?
Neovim version (nvim -v)
0.8.1
Operating system/version
macOS 13.1
Describe the bug
There’s already an open discussion for this issue: #187
I’m trying to lazily load (among others)
rstacruz/vim-closer
andtpope/vim-endwise
viaevent = "…"
; when doing so, the plugins are not working as intended, even though:Lazy
shows them as loaded. I triedevent = "VeryLazy"
,event = "VimEnter"
, andevent = "InsertEnter"
.Steps To Reproduce
nvim -u repro.lua
insert
modefunction() {
Expected Behavior
The plugins should be inserting the closing
}
as well as the endingend
:… but instead, nothing happens.
Repro
The text was updated successfully, but these errors were encountered: