From 9d4322572cde28db9fc188825a4a2674f72eb7b1 Mon Sep 17 00:00:00 2001 From: Squibid Date: Fri, 4 Jul 2025 05:27:36 -0400 Subject: [PATCH] should've tested the changes, nvim_create_usercommand doesn't like... unkown options --- lua/dep/lazy/loader/init.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lua/dep/lazy/loader/init.lua b/lua/dep/lazy/loader/init.lua index c901b0a..0603aa1 100644 --- a/lua/dep/lazy/loader/init.lua +++ b/lua/dep/lazy/loader/init.lua @@ -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)