mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 19:12:38 +00:00 
			
		
		
		
	treewide: begin restructuring the module tree
This commit is contained in:
		
					parent
					
						
							
								e1835f6c46
							
						
					
				
			
			
				commit
				
					
						7c730a78e5
					
				
			
		
					 254 changed files with 749 additions and 664 deletions
				
			
		
							
								
								
									
										36
									
								
								modules/plugins/utility/binds/which-key/config.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								modules/plugins/utility/binds/which-key/config.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,36 @@ | |||
| { | ||||
|   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}) | ||||
|     ''; | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue