mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-07 12:45:57 +01:00
lib: add mkLznBinding
This commit is contained in:
parent
f43d3835f1
commit
fc58c85524
1 changed files with 18 additions and 0 deletions
|
@ -71,6 +71,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
|
||||
|
|
Loading…
Reference in a new issue