File tree 2 files changed +14
-5
lines changed
2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,11 @@ M.defaults = {
58
58
notify = true , -- get a notification when new updates are found
59
59
frequency = 3600 , -- check for updates every hour
60
60
},
61
+ change_detection = {
62
+ -- automatically check for config file changes and reload the ui
63
+ enabled = true ,
64
+ notify = true , -- get a notification when changes are found
65
+ },
61
66
performance = {
62
67
--- @type LazyCacheConfig
63
68
cache = nil ,
@@ -145,7 +150,9 @@ function M.setup(spec, opts)
145
150
callback = function ()
146
151
require (" lazy.core.cache" ).autosave ()
147
152
require (" lazy.view" ).setup ()
148
- require (" lazy.manage.reloader" ).enable ()
153
+ if M .options .change_detection .enabled then
154
+ require (" lazy.manage.reloader" ).enable ()
155
+ end
149
156
if M .options .checker .enabled then
150
157
require (" lazy.manage.checker" ).start ()
151
158
end
Original file line number Diff line number Diff line change @@ -68,11 +68,13 @@ function M.check(start)
68
68
69
69
if not (start or # changes == 0 ) then
70
70
vim .schedule (function ()
71
- local lines = { " # Config Change Detected. Reloading..." , " " }
72
- for _ , change in ipairs (changes ) do
73
- table.insert (lines , " - **" .. change .what .. " **: `" .. vim .fn .fnamemodify (change .file , " :p:~:." ) .. " `" )
71
+ if Config .options .change_detection .notify then
72
+ local lines = { " # Config Change Detected. Reloading..." , " " }
73
+ for _ , change in ipairs (changes ) do
74
+ table.insert (lines , " - **" .. change .what .. " **: `" .. vim .fn .fnamemodify (change .file , " :p:~:." ) .. " `" )
75
+ end
76
+ Util .warn (lines )
74
77
end
75
- Util .warn (lines )
76
78
Plugin .load ()
77
79
vim .cmd ([[ do User LazyRender]] )
78
80
end )
You can’t perform that action at this time.
0 commit comments