forked from jan-leila/nix-config
		
	refactor: switched to using mkEnableOption
This commit is contained in:
		
							parent
							
								
									09d2588406
								
							
						
					
					
						commit
						58fec3f132
					
				
					 1 changed files with 3 additions and 11 deletions
				
			
		|  | @ -16,24 +16,16 @@ in { | |||
|             default = ["vivaxy" "vscode-conventional-commits"]; | ||||
|           }; | ||||
| 
 | ||||
|           emojiFormat = lib.mkOption { | ||||
|             type = lib.types.bool; | ||||
|             default = false; | ||||
|             description = "Enable emoji format for conventional commits"; | ||||
|           }; | ||||
|           gitmoji = lib.mkEnableOption "should emoji be prompted for as a part of the commit message./"; | ||||
| 
 | ||||
|           promptScopes = lib.mkOption { | ||||
|             type = lib.types.bool; | ||||
|             default = false; | ||||
|             description = "Enable prompting for scopes in conventional commits"; | ||||
|           }; | ||||
|           promptScopes = lib.mkEnableOption "prompting for scopes in conventional commits"; | ||||
|         }; | ||||
|       }; | ||||
|       config = lib.mkIf config.extraExtensions.conventionalCommits.enable { | ||||
|         extensions = [config.extraExtensions.conventionalCommits.extension]; | ||||
| 
 | ||||
|         userSettings = { | ||||
|           "conventionalCommits.emojiFormat" = config.extraExtensions.conventionalCommits.emojiFormat; | ||||
|           "conventionalCommits.gitmoji" = config.extraExtensions.conventionalCommits.gitmoji; | ||||
|           "conventionalCommits.promptScopes" = config.extraExtensions.conventionalCommits.promptScopes; | ||||
|         }; | ||||
|       }; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue