refactor: complete overhaul

Complete overhaul of repo structure based on nvix.

See https://github.com/niksingh710/nvix

Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
This commit is contained in:
Lander Van den Bulcke 2025-10-10 14:02:21 +02:00
parent ff2c59724a
commit 61feed4086
Signed by: lander
GPG key ID: 0142722B4B0C536F
75 changed files with 2916 additions and 2314 deletions

View file

@ -0,0 +1,40 @@
{ lib, ... }:
{
myvim.mkKey = rec {
# set of functions that returns attrs for keymap list
mkKeymap = mode: key: action: desc: {
inherit mode key action;
options = {
inherit desc;
silent = true;
noremap = true;
remap = true;
};
};
# use when no description is to be passed
mkKeymap' =
mode: key: action:
mkKeymap mode key action null;
mkKeymapWithOpts =
mode: key: action: desc: opts:
(mkKeymap mode key action desc) // { options = opts; };
# for which-key icon generation
# accepts a list of strings and returns a list of objects
# [{ __unkeyed, icon, group, hidden <optional boolean> }]
wKeyObj =
with builtins;
list:
{
__unkeyed = elemAt list 0;
icon = elemAt list 1;
group = elemAt list 2;
}
// lib.optionalAttrs (length list > 3) {
hidden = elemAt list 3;
};
};
}