mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-26 09:20:08 +00:00 
			
		
		
		
	colorizer: allow null for all options
This commit is contained in:
		
					parent
					
						
							
								2c37513012
							
						
					
				
			
			
				commit
				
					
						981fe07075
					
				
			
		
					 1 changed files with 49 additions and 10 deletions
				
			
		|  | @ -4,20 +4,59 @@ | |||
|   ... | ||||
| }: let | ||||
|   inherit (lib.options) mkOption mkEnableOption; | ||||
|   inherit (lib.types) attrsOf enum nullOr submodule; | ||||
|   inherit (lib.types) attrsOf enum nullOr submodule bool; | ||||
|   inherit (lib.modules) mkRenamedOptionModule; | ||||
|   inherit (lib.nvim.config) mkBool; | ||||
| 
 | ||||
|   settingSubmodule = submodule { | ||||
|     options = { | ||||
|       RGB = mkBool true "Colorize #RGB hex codes"; | ||||
|       RRGGBB = mkBool true "Colorize #RRGGBB hex codes"; | ||||
|       names = mkBool true ''Colorize "Name" codes like Blue''; | ||||
|       RRGGBBAA = mkBool false "Colorize #RRGGBBAA hex codes"; | ||||
|       rgb_fn = mkBool false "Colorize CSS rgb() and rgba() functions"; | ||||
|       hsl_fn = mkBool false "Colorize CSS hsl() and hsla() functions"; | ||||
|       css = mkBool false "Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB"; | ||||
|       css_fn = mkBool false "Enable all CSS *functions*: rgb_fn, hsl_fn"; | ||||
|       RGB = mkOption { | ||||
|         description = "Colorize #RGB hex codes"; | ||||
|         default = null; | ||||
|         type = nullOr bool; | ||||
|       }; | ||||
| 
 | ||||
|       RRGGBB = mkOption { | ||||
|         description = "Colorize #RRGGBB hex codes"; | ||||
|         default = null; | ||||
|         type = nullOr bool; | ||||
|       }; | ||||
| 
 | ||||
|       names = mkOption { | ||||
|         description = ''Colorize "Name" codes like Blue''; | ||||
|         default = null; | ||||
|         type = nullOr bool; | ||||
|       }; | ||||
| 
 | ||||
|       RRGGBBAA = mkOption { | ||||
|         description = "Colorize #RRGGBBAA hex codes"; | ||||
|         default = null; | ||||
|         type = nullOr bool; | ||||
|       }; | ||||
| 
 | ||||
|       rgb_fn = mkOption { | ||||
|         description = "Colorize CSS rgb() and rgba() functions"; | ||||
|         default = null; | ||||
|         type = nullOr bool; | ||||
|       }; | ||||
| 
 | ||||
|       hsl_fn = mkOption { | ||||
|         description = "Colorize CSS hsl() and hsla() functions"; | ||||
|         default = null; | ||||
|         type = nullOr bool; | ||||
|       }; | ||||
| 
 | ||||
|       css = mkOption { | ||||
|         description = "Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB"; | ||||
|         default = null; | ||||
|         type = nullOr bool; | ||||
|       }; | ||||
| 
 | ||||
|       css_fn = mkOption { | ||||
|         description = "Enable all CSS *functions*: rgb_fn, hsl_fn"; | ||||
|         default = null; | ||||
|         type = nullOr bool; | ||||
|       }; | ||||
| 
 | ||||
|       mode = mkOption { | ||||
|         description = "Set the display mode"; | ||||
|         type = nullOr (enum ["foreground" "background"]); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Ching Pei Yang
				Ching Pei Yang