Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit efa3de4

Browse files
committed
fix(plugins): show errors only on boot
1 parent 9e26bfe commit efa3de4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lua/leetcode.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ function leetcode.should_skip(on_vimenter)
2525
if bufinfo and (bufinfo.listed == 1 and #bufinfo.windows > 0) then
2626
local log = require("leetcode.logger")
2727
log.warn("Failed to initialize: `neovim` contains listed buffers")
28+
return true
2829
end
2930
end
3031
end

lua/leetcode/config/init.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,10 @@ function config.load_plugins()
108108
table.insert(lazy_plugs, plug.load)
109109
end
110110
else
111-
local log = require("leetcode.logger")
112-
log.error(plug)
111+
table.insert(lazy_plugs, function()
112+
local log = require("leetcode.logger")
113+
log.error(plug)
114+
end)
113115
end
114116
end
115117
end

0 commit comments

Comments
 (0)