mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 02:11:33 +00:00
refactor: move gestures
, which-key
, telescope
and cheatsheet
to utils
This commit is contained in:
parent
9cab13f667
commit
9ac1e1dadd
8 changed files with 3 additions and 3 deletions
22
modules/utility/binds/cheatsheet.nix
Normal file
22
modules/utility/binds/cheatsheet.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.binds.cheatsheet;
|
||||
in {
|
||||
options.vim.binds.cheatsheet = {
|
||||
enable = mkEnableOption "Searchable cheatsheet for nvim using telescope";
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable) {
|
||||
vim.startPlugins = ["cheatsheet-nvim"];
|
||||
|
||||
vim.luaConfigRC.cheaetsheet-nvim = nvim.dag.entryAnywhere ''
|
||||
require('cheatsheet').setup({})
|
||||
'';
|
||||
};
|
||||
}
|
11
modules/utility/binds/default.nix
Normal file
11
modules/utility/binds/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./which-key.nix
|
||||
./cheatsheet.nix
|
||||
];
|
||||
}
|
20
modules/utility/binds/which-key.nix
Normal file
20
modules/utility/binds/which-key.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.binds.whichKey;
|
||||
in {
|
||||
options.vim.binds.whichKey = {
|
||||
enable = mkEnableOption "which-key menu";
|
||||
};
|
||||
|
||||
config = mkIf (cfg.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