mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-21 16:59:47 +01:00
feat: add lib function to quickly mkIf bindings
This commit is contained in:
parent
13783d3d12
commit
2d9b24dfdb
1 changed files with 17 additions and 0 deletions
|
@ -7,6 +7,23 @@ in
|
|||
nixpkgsLib.extend (self: super: {
|
||||
nvim = mkNvimLib {lib = self;};
|
||||
|
||||
mkLuaBinding = key: action: desc:
|
||||
self.mkIf (key != null) {
|
||||
"${key}" = {
|
||||
inherit action desc;
|
||||
lua = true;
|
||||
silent = true;
|
||||
};
|
||||
};
|
||||
|
||||
mkBinding = key: action: desc:
|
||||
self.mkIf (key != null) {
|
||||
"${key}" = {
|
||||
inherit action desc;
|
||||
silent = true;
|
||||
};
|
||||
};
|
||||
|
||||
# For forward compatibility.
|
||||
literalExpression = super.literalExpression or super.literalExample;
|
||||
literalDocBook = super.literalDocBook or super.literalExample;
|
||||
|
|
Loading…
Reference in a new issue