mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-12-29 14:12:23 +00:00
Compare commits
3 commits
5887fa8e8b
...
3d9e8717e0
Author | SHA1 | Date | |
---|---|---|---|
|
3d9e8717e0 | ||
|
a60146064b | ||
|
cb191adaba |
2 changed files with 33 additions and 36 deletions
|
@ -9,7 +9,7 @@
|
||||||
typesCustom = import ./custom.nix {inherit lib;};
|
typesCustom = import ./custom.nix {inherit lib;};
|
||||||
in {
|
in {
|
||||||
inherit (typesDag) dagOf;
|
inherit (typesDag) dagOf;
|
||||||
inherit (typesPlugin) pluginsOpt extraPluginType mkPluginSetupOption luaInline pluginType lznPluginType lznPluginTableType;
|
inherit (typesPlugin) pluginsOpt extraPluginType mkPluginSetupOption luaInline pluginType;
|
||||||
inherit (typesLanguage) diagnostics mkGrammarOption;
|
inherit (typesLanguage) diagnostics mkGrammarOption;
|
||||||
inherit (typesCustom) anythingConcatLists char;
|
inherit (typesCustom) anythingConcatLists char;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,39 +2,10 @@
|
||||||
inherit (lib.options) mkOption mkEnableOption;
|
inherit (lib.options) mkOption mkEnableOption;
|
||||||
inherit (lib.types) enum listOf submodule nullOr str bool int attrsOf anything either oneOf;
|
inherit (lib.types) enum listOf submodule nullOr str bool int attrsOf anything either oneOf;
|
||||||
inherit (lib.nvim.types) pluginType;
|
inherit (lib.nvim.types) pluginType;
|
||||||
|
inherit (lib.nvim.config) mkBool;
|
||||||
|
|
||||||
lznKeysSpec = submodule {
|
lznKeysSpec = submodule {
|
||||||
options = {
|
options = {
|
||||||
desc = mkOption {
|
|
||||||
description = "Description of the key map";
|
|
||||||
type = nullOr str;
|
|
||||||
default = null;
|
|
||||||
};
|
|
||||||
|
|
||||||
noremap = mkOption {
|
|
||||||
description = "TBD";
|
|
||||||
type = bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
expr = mkOption {
|
|
||||||
description = "TBD";
|
|
||||||
type = bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
nowait = mkOption {
|
|
||||||
description = "TBD";
|
|
||||||
type = bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
ft = mkOption {
|
|
||||||
description = "TBD";
|
|
||||||
type = nullOr (listOf str);
|
|
||||||
default = null;
|
|
||||||
};
|
|
||||||
|
|
||||||
key = mkOption {
|
key = mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
description = "Key to bind to";
|
description = "Key to bind to";
|
||||||
|
@ -45,11 +16,21 @@
|
||||||
default = null;
|
default = null;
|
||||||
description = "Action to trigger.";
|
description = "Action to trigger.";
|
||||||
};
|
};
|
||||||
|
lua = mkBool false ''
|
||||||
|
If true, `action` is considered to be lua code.
|
||||||
|
Thus, it will not be wrapped in `""`.
|
||||||
|
'';
|
||||||
|
|
||||||
lua = mkOption {
|
desc = mkOption {
|
||||||
type = bool;
|
description = "Description of the key map";
|
||||||
default = false;
|
type = nullOr str;
|
||||||
description = "If true the action is treated as a lua function instead of a vim command.";
|
default = null;
|
||||||
|
};
|
||||||
|
|
||||||
|
ft = mkOption {
|
||||||
|
description = "TBD";
|
||||||
|
type = nullOr (listOf str);
|
||||||
|
default = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
mode = mkOption {
|
mode = mkOption {
|
||||||
|
@ -57,6 +38,10 @@
|
||||||
type = listOf str;
|
type = listOf str;
|
||||||
default = ["n" "x" "s" "o"];
|
default = ["n" "x" "s" "o"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
noremap = mkBool true "Whether to use the 'noremap' variant of the command, ignoring any custom mappings on the defined action. It is highly advised to keep this on, which is the default.";
|
||||||
|
expr = mkBool false "Means that the action is actually an expression. Equivalent to adding <expr> to a map.";
|
||||||
|
nowait = mkBool false "Whether to wait for extra input on ambiguous mappings. Equivalent to adding <nowait> to a map.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -153,7 +138,19 @@
|
||||||
type = nullOr (oneOf [str (listOf lznKeysSpec) (listOf str)]);
|
type = nullOr (oneOf [str (listOf lznKeysSpec) (listOf str)]);
|
||||||
example = ''
|
example = ''
|
||||||
keys = [
|
keys = [
|
||||||
{lhs = "<leader>s"; rhs = ":NvimTreeToggle<cr>"; desc = "Toggle NvimTree"}
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>s";
|
||||||
|
action = ":DapStepOver<cr>";
|
||||||
|
desc = "DAP Step Over";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = ["n", "x"];
|
||||||
|
key = "<leader>dc";
|
||||||
|
action = "function() require('dap').continue() end";
|
||||||
|
lua = true;
|
||||||
|
desc = "DAP Continue";
|
||||||
|
}
|
||||||
]
|
]
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue