mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
keymaps: use 'action.__raw' instead of 'lua = true' internally
This commit is contained in:
parent
26a7c7ec5c
commit
2294a12b0b
8 changed files with 11 additions and 21 deletions
|
@ -22,8 +22,7 @@ with lib; {
|
||||||
# Mode can be a string or a list of strings
|
# Mode can be a string or a list of strings
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>p";
|
key = "<leader>p";
|
||||||
action = "require('my-plugin').do_stuff";
|
action.__raw = "require('my-plugin').do_stuff";
|
||||||
lua = true;
|
|
||||||
# Note that all of the mapping options are now under the `options` attrs
|
# Note that all of the mapping options are now under the `options` attrs
|
||||||
options = {
|
options = {
|
||||||
silent = true;
|
silent = true;
|
||||||
|
|
|
@ -128,8 +128,7 @@ in {
|
||||||
in {
|
in {
|
||||||
mode = "n";
|
mode = "n";
|
||||||
inherit key;
|
inherit key;
|
||||||
action = prefix + actionStr;
|
action.__raw = prefix + actionStr;
|
||||||
lua = true;
|
|
||||||
|
|
||||||
options =
|
options =
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,15 +12,13 @@ with lib; let
|
||||||
ai = {
|
ai = {
|
||||||
key = "gw";
|
key = "gw";
|
||||||
mode = ["n" "x"];
|
mode = ["n" "x"];
|
||||||
action = "require('wtf').ai";
|
action.__raw = "require('wtf').ai";
|
||||||
lua = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
search = {
|
search = {
|
||||||
key = "gW";
|
key = "gW";
|
||||||
mode = "n";
|
mode = "n";
|
||||||
action = "require('wtf').search";
|
action.__raw = "require('wtf').search";
|
||||||
lua = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
|
|
@ -104,8 +104,7 @@ in {
|
||||||
in {
|
in {
|
||||||
mode = "n";
|
mode = "n";
|
||||||
inherit key;
|
inherit key;
|
||||||
action = "require('telescope.builtin').${actionStr}";
|
action.__raw = "require('telescope.builtin').${actionStr}";
|
||||||
lua = true;
|
|
||||||
|
|
||||||
options =
|
options =
|
||||||
{
|
{
|
||||||
|
|
|
@ -233,7 +233,7 @@ in {
|
||||||
(key != null)
|
(key != null)
|
||||||
{
|
{
|
||||||
inherit key;
|
inherit key;
|
||||||
action = luaFunc;
|
action.__raw = luaFunc;
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -256,7 +256,7 @@ in {
|
||||||
mapAttrsToList
|
mapAttrsToList
|
||||||
(id: key: {
|
(id: key: {
|
||||||
inherit key;
|
inherit key;
|
||||||
action = genLuaFunc id;
|
action.__raw = genLuaFunc id;
|
||||||
})
|
})
|
||||||
mappingsAttrs
|
mappingsAttrs
|
||||||
)
|
)
|
||||||
|
@ -283,7 +283,6 @@ in {
|
||||||
helpers.keymaps.mkKeymaps
|
helpers.keymaps.mkKeymaps
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
lua = true;
|
|
||||||
options.silent = cfg.keymapsSilent;
|
options.silent = cfg.keymapsSilent;
|
||||||
}
|
}
|
||||||
allMappings;
|
allMappings;
|
||||||
|
|
|
@ -23,8 +23,7 @@ in {
|
||||||
{
|
{
|
||||||
mode = "i";
|
mode = "i";
|
||||||
key = "<Tab>";
|
key = "<Tab>";
|
||||||
action = "require('intellitab').indent";
|
action.__raw = "require('intellitab').indent";
|
||||||
lua = true;
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
plugins.treesitter = {
|
plugins.treesitter = {
|
||||||
|
|
|
@ -61,8 +61,7 @@ with lib; {
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = copy;
|
key = copy;
|
||||||
action = "require('osc52').copy_operator";
|
action.__raw = "require('osc52').copy_operator";
|
||||||
lua = true;
|
|
||||||
options = {
|
options = {
|
||||||
expr = true;
|
expr = true;
|
||||||
inherit silent;
|
inherit silent;
|
||||||
|
@ -80,8 +79,7 @@ with lib; {
|
||||||
{
|
{
|
||||||
mode = "v";
|
mode = "v";
|
||||||
key = copyVisual;
|
key = copyVisual;
|
||||||
action = "require('osc52').copy_visual";
|
action.__raw = "require('osc52').copy_visual";
|
||||||
lua = true;
|
|
||||||
options.silent = silent;
|
options.silent = silent;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
@ -57,8 +57,7 @@ in {
|
||||||
motion: key: {
|
motion: key: {
|
||||||
mode = ["n" "o" "x"];
|
mode = ["n" "o" "x"];
|
||||||
inherit key;
|
inherit key;
|
||||||
action = "function() require('spider').motion('${motion}') end";
|
action.__raw = "function() require('spider').motion('${motion}') end";
|
||||||
lua = true;
|
|
||||||
options = {
|
options = {
|
||||||
inherit (cfg.keymaps) silent;
|
inherit (cfg.keymaps) silent;
|
||||||
desc = "Spider-${motion}";
|
desc = "Spider-${motion}";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue