lib: add mkLznBinding

This commit is contained in:
Ching Pei Yang 2024-08-03 19:18:25 +02:00 committed by Pei Yang Ching
parent 5ba5fa29ff
commit 88de04e94c

View file

@ -98,6 +98,24 @@
mkLznBinding = mode: lhs: rhs: desc: {
inherit mode lhs rhs desc;
};
# Usage:
#
# ```
# vim.lazy.plugins = {
# telescope = {
# # ...
# keys = builtins.filter ({lhs, ...}: lhs != null) [
# mkSetLznBinding mapping ":Telescope<CR>"
# ];
# }
# }
# ```
mkSetLznBinding = binding: action: {
lhs = binding.value;
rhs = action;
desc = binding.description;
};
};
in
binds