mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-07 19:01:35 +00:00
dev: rebase on a less personalized neovim flake
This commit is contained in:
commit
9c00808863
70 changed files with 4910 additions and 0 deletions
6
modules/keys/default.nix
Normal file
6
modules/keys/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {imports = [./which-key.nix];}
|
24
modules/keys/which-key.nix
Normal file
24
modules/keys/which-key.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.keys;
|
||||
in {
|
||||
options.vim.keys = {
|
||||
enable = mkEnableOption "key binding plugins";
|
||||
|
||||
whichKey = {
|
||||
enable = mkEnableOption "which-key menu";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable && cfg.whichKey.enable) {
|
||||
vim.startPlugins = ["which-key"];
|
||||
|
||||
vim.luaConfigRC.whichkey = nvim.dag.entryAnywhere ''local wk = require("which-key").setup {}'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue