fix conform.nix
This commit is contained in:
		
							parent
							
								
									da9d800647
								
							
						
					
					
						commit
						875cd4cefa
					
				
					 1 changed files with 23 additions and 12 deletions
				
			
		| 
						 | 
					@ -1,4 +1,8 @@
 | 
				
			||||||
{pkgs, ...}: {
 | 
					{
 | 
				
			||||||
 | 
					  lib,
 | 
				
			||||||
 | 
					  pkgs,
 | 
				
			||||||
 | 
					  ...
 | 
				
			||||||
 | 
					}: {
 | 
				
			||||||
  plugins.conform-nvim = {
 | 
					  plugins.conform-nvim = {
 | 
				
			||||||
    enable = true;
 | 
					    enable = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,25 +12,32 @@
 | 
				
			||||||
        lspFallback = true;
 | 
					        lspFallback = true;
 | 
				
			||||||
        timeoutMs = 500;
 | 
					        timeoutMs = 500;
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					      # Receive notificaton when a formatter errors.
 | 
				
			||||||
 | 
					      notifyOnError = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # Map of filetype to formatters.
 | 
					      # Map of filetype to formatters.
 | 
				
			||||||
      formattersByFt = {
 | 
					      formatters_by_ft = {
 | 
				
			||||||
        c = ["clang-format"];
 | 
					        c = ["clang-format"];
 | 
				
			||||||
        haskell = ["stylish-haskell"];
 | 
					        haskell = ["stylish-haskell"];
 | 
				
			||||||
        lua = ["stylua"];
 | 
					        lua = ["stylua"];
 | 
				
			||||||
        nix = ["alejandra"];
 | 
					        nix = ["alejandra"];
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # Receive notificaton when a formatter errors.
 | 
					      # Install our formatters
 | 
				
			||||||
      notifyOnError = true;
 | 
					      formatters = {
 | 
				
			||||||
 | 
					        alejandra = {
 | 
				
			||||||
 | 
					          command = lib.getExe pkgs.alejandra;
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					        clang-format = {
 | 
				
			||||||
 | 
					          command = lib.getExe' pkgs.clang-tools "clang-format";
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					        stylish-haskell = {
 | 
				
			||||||
 | 
					          command = lib.getExe pkgs.stylish-haskell;
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					        stylua = {
 | 
				
			||||||
 | 
					          command = lib.getExe pkgs.stylua;
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Install our formatters.
 | 
					 | 
				
			||||||
  extraPackages = with pkgs; [
 | 
					 | 
				
			||||||
    alejandra
 | 
					 | 
				
			||||||
    clang-tools
 | 
					 | 
				
			||||||
    stylish-haskell
 | 
					 | 
				
			||||||
    stylua
 | 
					 | 
				
			||||||
  ];
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue