refactor(config): auto-import config files

This commit is contained in:
Nicolas Goudry 2024-05-27 09:39:25 +02:00
parent 1c12503ebf
commit 465916d5c1
No known key found for this signature in database
GPG key ID: 5FC434D9FFD1DF44
5 changed files with 126 additions and 109 deletions

View file

@ -4,30 +4,32 @@ let
options.desc = "Force write";
};
in
[
{
key = "<leader>n";
action = "<cmd>enew<cr>";
options.desc = "New file";
}
{
inherit (forceWrite) action options;
key = "<c-s>";
}
{
inherit (forceWrite) options;
mode = [ "i" "x" ];
key = "<c-s>";
action = "<esc>${forceWrite.action}";
}
{
key = "|";
action = "<cmd>vsplit<cr>";
options.desc = "Split vertically";
}
{
key = "\\";
action = "<cmd>split<cr>";
options.desc = "Split horizontally";
}
]
{
keymaps = [
{
key = "<leader>n";
action = "<cmd>enew<cr>";
options.desc = "New file";
}
{
inherit (forceWrite) action options;
key = "<c-s>";
}
{
inherit (forceWrite) options;
mode = [ "i" "x" ];
key = "<c-s>";
action = "<esc>${forceWrite.action}";
}
{
key = "|";
action = "<cmd>vsplit<cr>";
options.desc = "Split vertically";
}
{
key = "\\";
action = "<cmd>split<cr>";
options.desc = "Split horizontally";
}
];
}