mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
modules/commands: fix lua cmd.options value when no options are set
This commit is contained in:
parent
c5143dc519
commit
c97afcbf82
2 changed files with 4 additions and 1 deletions
|
@ -54,7 +54,7 @@ in {
|
||||||
extraConfigLua = helpers.wrapDo ''
|
extraConfigLua = helpers.wrapDo ''
|
||||||
local cmds = ${helpers.toLuaObject (mapAttrs cleanupCommand config.userCommands)};
|
local cmds = ${helpers.toLuaObject (mapAttrs cleanupCommand config.userCommands)};
|
||||||
for name,cmd in pairs(cmds) do
|
for name,cmd in pairs(cmds) do
|
||||||
vim.api.nvim_create_user_command(name, cmd.command, cmd.options)
|
vim.api.nvim_create_user_command(name, cmd.command, cmd.options or {})
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
command = ":w<CR>";
|
command = ":w<CR>";
|
||||||
desc = "Write file";
|
desc = "Write file";
|
||||||
};
|
};
|
||||||
|
"Z" = {
|
||||||
|
command = ":echo fooo<CR>";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue