mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-23 05:40:44 +00:00
lib: add mkLznBinding
This commit is contained in:
parent
5ba5fa29ff
commit
88de04e94c
1 changed files with 18 additions and 0 deletions
|
@ -98,6 +98,24 @@
|
||||||
mkLznBinding = mode: lhs: rhs: desc: {
|
mkLznBinding = mode: lhs: rhs: desc: {
|
||||||
inherit 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
|
in
|
||||||
binds
|
binds
|
||||||
|
|
Loading…
Reference in a new issue