mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-11-04 04:32:21 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			51 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			51 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
{
 | 
						|
  config,
 | 
						|
  lib,
 | 
						|
  ...
 | 
						|
}: let
 | 
						|
  inherit (lib.options) mkOption mkEnableOption;
 | 
						|
  inherit (lib.types) attrsOf nullOr str attrs enum bool;
 | 
						|
  inherit (lib.nvim.types) mkPluginSetupOption;
 | 
						|
in {
 | 
						|
  options.vim.binds.whichKey = {
 | 
						|
    enable = mkEnableOption "which-key keybind helper menu";
 | 
						|
    register = mkOption {
 | 
						|
      type = attrsOf (nullOr str);
 | 
						|
      default = {};
 | 
						|
      description = "Register label for which-key keybind helper menu";
 | 
						|
    };
 | 
						|
 | 
						|
    setupOpts = mkPluginSetupOption "which-key" {
 | 
						|
      preset = mkOption {
 | 
						|
        type = enum ["classic" "modern" "helix"];
 | 
						|
        default = "modern";
 | 
						|
        description = "The default preset for the which-key window";
 | 
						|
      };
 | 
						|
 | 
						|
      notify = mkOption {
 | 
						|
        type = bool;
 | 
						|
        default = true;
 | 
						|
        description = "Show a warning when issues were detected with mappings";
 | 
						|
      };
 | 
						|
 | 
						|
      replace = mkOption {
 | 
						|
        type = attrs;
 | 
						|
        default = {
 | 
						|
          "<space>" = "SPACE";
 | 
						|
          "<leader>" = "SPACE";
 | 
						|
          "<cr>" = "RETURN";
 | 
						|
          "<tab>" = "TAB";
 | 
						|
        };
 | 
						|
        description = "Functions/Lua Patterns for formatting the labels";
 | 
						|
      };
 | 
						|
 | 
						|
      win = {
 | 
						|
        border = mkOption {
 | 
						|
          type = str;
 | 
						|
          default = config.vim.ui.borders.plugins.which-key.style;
 | 
						|
          description = "Which-key window border style";
 | 
						|
        };
 | 
						|
      };
 | 
						|
    };
 | 
						|
  };
 | 
						|
}
 |