mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-26 07:06:44 +00:00
8d5f23035d
* statix, deadnix, alejandra * _file * _module.args * concatStringsSep "\n" -> concatLines concatStringsSep "\n" map -> concatMapStringsSep "\n" * mkShell nativeBuildInputs -> packages
37 lines
813 B
Nix
37 lines
813 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (lib.modules) mkIf;
|
|
inherit (lib.strings) optionalString;
|
|
inherit (lib.nvim.lua) toLuaObject;
|
|
inherit (lib.nvim.dag) entryAnywhere;
|
|
|
|
cfg = config.vim.binds.whichKey;
|
|
in {
|
|
config = mkIf cfg.enable {
|
|
vim.startPlugins = ["which-key"];
|
|
|
|
vim.luaConfigRC.whichkey = entryAnywhere ''
|
|
local wk = require("which-key")
|
|
wk.setup ({
|
|
key_labels = {
|
|
["<space>"] = "SPACE",
|
|
["<leader>"] = "SPACE",
|
|
["<cr>"] = "RETURN",
|
|
["<tab>"] = "TAB",
|
|
},
|
|
|
|
${optionalString config.vim.ui.borders.plugins.which-key.enable ''
|
|
window = {
|
|
border = "${config.vim.ui.borders.plugins.which-key.style}",
|
|
},
|
|
''}
|
|
})
|
|
|
|
wk.register(${toLuaObject cfg.register})
|
|
'';
|
|
};
|
|
}
|