Skip to content

Commit 3b31897

Browse files
committed
fix(cmd): lazy-cmds no longer show an error for buffer-local commands
1 parent a993bfd commit 3b31897

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/lazy/core/handler/cmd.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function M:_add(cmd)
3333

3434
self:_load(cmd)
3535

36-
local info = vim.api.nvim_get_commands({})[cmd]
36+
local info = vim.api.nvim_get_commands({})[cmd] or vim.api.nvim_buf_get_commands(0, {})[cmd]
3737
if not info then
3838
return Util.error("Command `" .. cmd .. "` not found after loading " .. plugins)
3939
end

0 commit comments

Comments
 (0)