mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
modules/commands: allow commands to be raw lua
This commit is contained in:
parent
3ec6dff17b
commit
1c9f2a23a6
2 changed files with 9 additions and 1 deletions
|
@ -9,7 +9,7 @@ let
|
|||
commandAttributes = types.submodule {
|
||||
options = {
|
||||
command = mkOption {
|
||||
type = types.str;
|
||||
type = with helpers.nixvimTypes; either str rawLua;
|
||||
description = "The command to run.";
|
||||
};
|
||||
|
||||
|
|
|
@ -9,6 +9,14 @@
|
|||
"Z" = {
|
||||
command = ":echo fooo<CR>";
|
||||
};
|
||||
"InsertHere" = {
|
||||
command.__raw = ''
|
||||
function(opts)
|
||||
vim.api.nvim_put({opts.args}, 'c', true, true)
|
||||
end
|
||||
'';
|
||||
nargs = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue