mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
feat: added options to configure change detection. Fixes #32
This commit is contained in:
parent
cd162f342a
commit
6c767a604d
2 changed files with 14 additions and 5 deletions
|
@ -68,11 +68,13 @@ function M.check(start)
|
|||
|
||||
if not (start or #changes == 0) then
|
||||
vim.schedule(function()
|
||||
local lines = { "# Config Change Detected. Reloading...", "" }
|
||||
for _, change in ipairs(changes) do
|
||||
table.insert(lines, "- **" .. change.what .. "**: `" .. vim.fn.fnamemodify(change.file, ":p:~:.") .. "`")
|
||||
if Config.options.change_detection.notify then
|
||||
local lines = { "# Config Change Detected. Reloading...", "" }
|
||||
for _, change in ipairs(changes) do
|
||||
table.insert(lines, "- **" .. change.what .. "**: `" .. vim.fn.fnamemodify(change.file, ":p:~:.") .. "`")
|
||||
end
|
||||
Util.warn(lines)
|
||||
end
|
||||
Util.warn(lines)
|
||||
Plugin.load()
|
||||
vim.cmd([[do User LazyRender]])
|
||||
end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue