should've tested the changes, nvim_create_usercommand doesn't like...
unkown options
This commit is contained in:
@ -37,8 +37,10 @@ end
|
||||
function lazy_loader:cmd(name, opts)
|
||||
opts = opts or {}
|
||||
|
||||
-- rerun is on by default
|
||||
opts["rerun"] = opts["rerun"] or true
|
||||
-- move the rerun arg to a seperate variable because keymap.set doesn't like
|
||||
-- options it doesn't know of
|
||||
local rerun = opts["rerun"] or true
|
||||
opts['rerun'] = nil
|
||||
|
||||
-- load the plugin on completion
|
||||
if not opts["complete"] then
|
||||
@ -57,7 +59,7 @@ function lazy_loader:cmd(name, opts)
|
||||
self:cleanup()
|
||||
|
||||
-- attempt to rerun the command
|
||||
if not opts["rerun"] then
|
||||
if not rerun then
|
||||
pcall(vim.cmd, name)
|
||||
end
|
||||
end, opts)
|
||||
|
Reference in New Issue
Block a user