-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: allow lazy loading upon entering visual mode #29
Comments
Closing after seeing 3a10ba5 |
I didn't even check if it was disallowing other events from being used, so that's my bad. I can reproduce this. I looked into alternative methods and it looks at the moment that I can successfully load on Is this interesting as a default? Edit: note to self for posterity, see #25 |
Hmm, interesting idea. I guess in theory you might break compatibility for some users that remap any of those keys (?) but I imagine that's a very small percent given that they're Vim defaults for very common tasks. If anything it'd be convenient if Part of me wonders if just removing Like I said though, I imagine those are far and few between, and I'm not even certain it'd mess up in those cases. So hey, whatever works I guess! |
That's true, I hadn't considered that.
I also think this is the best option. I'm going to make this change today. |
Update:
|
167f6d1 adds a line about lazy loading on |
lazy.nvim
seems to respectvisual-whitespace
's/lazy.lua
, which loads the plugin onBufEnter
, and it seems like anyevent
passed to lazy gets overridden by this.visual-whitespace.nvim
could be lazy-loaded upon entering visual mode withevent = "ModeChanged *:[vV\x16]"
, which would load the plugin whenever the user enters visual, visual line, or visual block mode for the first time. This is preferable (in my opinion at least) because it keeps the plugin from being loaded until it's needed, which is generally thelazy.nvim
convention.I'd request that either
event = "ModeChanged *:[vV\x16]"
becomes the default load event to replaceBufEnter
in/lazy.lua
(I believe this is a sensible default), or thatlazy.lua
just gets removed in favor of allowing the user to decide when the plugin gets loaded.The text was updated successfully, but these errors were encountered: