Skip to content
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

feature: use data attribute in User events. #1302

Closed
1 task done
aarondill opened this issue Feb 2, 2024 · 2 comments
Closed
1 task done

feature: use data attribute in User events. #1302

aarondill opened this issue Feb 2, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@aarondill
Copy link

Did you check the docs?

  • I have read all the lazy.nvim docs

Is your feature request related to a problem? Please describe.

The docs list the available events, and only LazyLoad has anything set in the data attribute (the plugin name).

My personal use-case is to attempt to implement the hack you mentioned here to have documentation always loaded while lazy loading plugins.

Describe the solution you'd like

Other events where having information about which plugin will change/just changed include:
LazyInstall, LazyUpdate, LazyClean, LazyInstallPre, LazyUpdatePre, LazyCleanPre

Less immediately useful but potentially have a use-case:
LazyCheck: plugins for which updates were found
LazySync: which plugins changed (do we know this info?)
LazySyncPre: which plugins will change (impossible?)
LazyReload: which file(s) changed to cause the reload

Describe alternatives you've considered

  • somehow diff the /lazy folder between LazyEventPre and LazyEvent
  • Assume all plugins changed when LazyInstall, LazyUpdate, LazyClean or LazyCheck fire

Additional context

No response

@aarondill aarondill added the enhancement New feature or request label Feb 2, 2024
@folke
Copy link
Owner

folke commented Jun 24, 2024

It's better to just use the unloaded rtp for showing helptags in telescope/fzf-lua.

Related: ibhagwan/fzf-lua#1296

@folke folke closed this as not planned Won't fix, can't repro, duplicate, stale Jun 24, 2024
@aarondill
Copy link
Author

That is a better implementation of this specific use case, however this issue is about the generic implementation of Lazy's User events.
I have run into several instances where there was an existing event for what I wanted to hook into, but it didn't provide the information needed to do anything useful. For example, patching a plugin on Build/Install; notifying on installing incompatible dependencies; etc.

I don't expect lazy to implement my specific use cases, but i'd like for the event system to provide as much information as possible to user hooks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants