Skip to content

Commit

Permalink
feat: prettier debug
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jun 2, 2024
1 parent 9614482 commit 766931a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lua/lazydev/buf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ function M.on_change()

if not vim.deep_equal(settings, client.settings) then
if Config.debug then
vim.notify("update settings:\n- " .. table.concat(library, "\n- "))
M.debug()
end
client.settings = settings
client.notify("workspace/didChangeConfiguration", {
Expand All @@ -188,4 +188,15 @@ function M.on_change()
end
end

function M.debug()
local Util = require("lazy.core.util")
local Plugin = require("lazy.core.plugin")
local lines = {}
for _, lib in ipairs(M.library) do
local plugin = Plugin.find(lib .. "/")
table.insert(lines, "- " .. (plugin and "**" .. plugin.name .. "**" or "`" .. lib .. "`"))
end
Util.info(lines, { title = "lazydev.nvim" })
end

return M

0 comments on commit 766931a

Please sign in to comment.