diff --git a/modules/commands.nix b/modules/commands.nix index 9ca743e2..ebf730af 100644 --- a/modules/commands.nix +++ b/modules/commands.nix @@ -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."; }; diff --git a/tests/test-sources/modules/commands.nix b/tests/test-sources/modules/commands.nix index 5597e12a..efa12789 100644 --- a/tests/test-sources/modules/commands.nix +++ b/tests/test-sources/modules/commands.nix @@ -9,6 +9,14 @@ "Z" = { command = ":echo fooo"; }; + "InsertHere" = { + command.__raw = '' + function(opts) + vim.api.nvim_put({opts.args}, 'c', true, true) + end + ''; + nargs = 1; + }; }; }; }