mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-09 03:25:58 +01:00
b499151527
* ui: allow custom listOf str border type * lib: extract shared borderType * remove TODO * allow ["|" "HighlightGroup"] for border char * docs: update rl notes --------- Co-authored-by: raf <raf@notashelf.dev>
36 lines
820 B
Nix
36 lines
820 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.pluginRC.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 = ${toLuaObject config.vim.ui.borders.plugins.which-key.style},
|
|
},
|
|
''}
|
|
})
|
|
|
|
wk.register(${toLuaObject cfg.register})
|
|
'';
|
|
};
|
|
}
|