mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 02:52:37 +00:00 
			
		
		
		
	collections/mini: init
This commit is contained in:
		
					parent
					
						
							
								4b9047025f
							
						
					
				
			
			
				commit
				
					
						952a3f1ad0
					
				
			
		
					 7 changed files with 95 additions and 0 deletions
				
			
		
							
								
								
									
										32
									
								
								modules/plugins/collections/mini-nvim/config.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								modules/plugins/collections/mini-nvim/config.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,32 @@ | |||
| { | ||||
|   options, | ||||
|   config, | ||||
|   lib, | ||||
|   pkgs, | ||||
|   inputs, | ||||
|   ... | ||||
| }: let | ||||
|   inherit (lib) mkMerge; | ||||
|   inherit (lib.modules) mkIf; | ||||
|   inherit (lib.strings) concatStringsSep; | ||||
|   inherit (lib.attrsets) mapAttrsToList; | ||||
|   inherit (lib.nvim.lua) toLuaObject; | ||||
| 
 | ||||
|   cfg = config.vim.collections.mini-nvim; | ||||
| in { | ||||
|   config = mkIf cfg.enable { | ||||
|     vim.lazy.plugins."mini-nvim" = { | ||||
|       package = "mini-nvim"; | ||||
|       # package = pkgs.vimPlugins.mini-nvim; | ||||
|       # package = pkgs.vimUtils.buildVimPlugin { | ||||
|       #   name = "mini-nvim"; | ||||
|       #   src = inputs.plugin-mini-nvim; | ||||
|       # }; | ||||
|       lazy = false; | ||||
|       after = concatStringsSep "\n" (mapAttrsToList (name: value: '' | ||||
|           require("mini.${name}").setup(${toLuaObject value.setupOpts}) | ||||
|         '') | ||||
|         cfg.modules); | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										6
									
								
								modules/plugins/collections/mini-nvim/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								modules/plugins/collections/mini-nvim/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,6 @@ | |||
| { | ||||
|   imports = [ | ||||
|     ./config.nix | ||||
|     ./mini-nvim.nix | ||||
|   ]; | ||||
| } | ||||
							
								
								
									
										28
									
								
								modules/plugins/collections/mini-nvim/mini-nvim.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								modules/plugins/collections/mini-nvim/mini-nvim.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,28 @@ | |||
| {lib, ...}: let | ||||
|   inherit (lib.options) mkEnableOption mkOption literalExpression; | ||||
|   inherit (lib.types) attrsOf submodule; | ||||
|   inherit (lib.nvim.types) mkPluginSetupOption; | ||||
| in { | ||||
|   options.vim.collections.mini-nvim = { | ||||
|     enable = mkEnableOption "mini.nvim, a collection of quality-of-life modules"; | ||||
|     modules = mkOption { | ||||
|       type = attrsOf (submodule { | ||||
|         options = { | ||||
|           setupOpts = mkPluginSetupOption "mini.nvim plugin" {}; | ||||
|         }; | ||||
|       }); | ||||
|       default = {}; | ||||
|       example = | ||||
|         literalExpression | ||||
|         '' | ||||
|           { | ||||
|             files = {}; | ||||
|             sessions = { | ||||
|               autoread = true; | ||||
|               autowrite = true; | ||||
|             }; | ||||
|           } | ||||
|         ''; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 LilleAila
				LilleAila