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 Request] Option to disable notification "Config Change Detected. Reloading..." #32

Closed
maxmahlke opened this issue Dec 20, 2022 · 10 comments · Fixed by #30
Closed
Labels
enhancement New feature or request

Comments

@maxmahlke
Copy link

Is your feature request related to a problem? Please describe.
I'm porting my nvim config to lazy and am getting the "Config Change Detected. Reloading..." notification on every safe. I save a lot.

Describe the solution you'd like
An option that disables the notification and just updates the lazy index silently.

@maxmahlke maxmahlke added the enhancement New feature or request label Dec 20, 2022
@tsakirist
Copy link
Contributor

tsakirist commented Dec 20, 2022

An option to specify which notifications to enable/disable would be really nice.
For instance, I like the "New Updates" notification, but I don't like the [cache:load]: <path> .

@folke
Copy link
Owner

folke commented Dec 20, 2022

@tsakirist did you enable debug?

@tsakirist
Copy link
Contributor

Whoops, yeap, it's enabled. Silly me.

@folke folke closed this as completed in 6c767a6 Dec 20, 2022
@folke
Copy link
Owner

folke commented Dec 20, 2022

@maxmahlke check the docs on change_detection. I just pushed an update to make that configurable

@maxmahlke
Copy link
Author

Works like a charm, merci Folke!

@smjonas
Copy link
Contributor

smjonas commented Feb 1, 2023

For anyone too lazy: change_detection = { enabled = false }

@unphased
Copy link

unphased commented Feb 4, 2023

How to make change detection work? If i edit my init.vim (where i have all plugin loads defined) and save, nothing happens. If I run :Lazy, it does not list any of the plugins I just added in the session. I have inserted the change_detection enabled to lazy's options.

@unphased
Copy link

unphased commented Feb 4, 2023

Update: OK i am pretty sure that

spec changes will automatically be reloaded when they're updated, so the :Lazy UI is always up to date

From the doc is exactly about this. OK so I def need to make this change because defining plugins inline disables change detection. Been putting it off since my dotfiles are still heavily structured around old vim configuration file locations.

@rspi
Copy link

rspi commented Feb 24, 2023

Does this still work or am I doing something wrong?

require("lazy").setup({
	{
		import = "plugins",
		change_detection = {
			notify = false,
		},
	},
})

If I change any of my modules in /plugins I get the Config Change Detected. Reloading...-message.
Even if I set enabled = false.

@rspi
Copy link

rspi commented Feb 24, 2023

Oh - never mind..

This seems to work:

require("lazy").setup("plugins", {
	change_detection = {
		notify = false,
	},
})

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

Successfully merging a pull request may close this issue.

6 participants