mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-26 09:20:08 +00:00 
			
		
		
		
	language/fsharp: migrate to conform/nvim-lint
This commit is contained in:
		
					parent
					
						
							
								07384c3887
							
						
					
				
			
			
				commit
				
					
						6225dff47a
					
				
			
		
					 1 changed files with 8 additions and 10 deletions
				
			
		|  | @ -7,6 +7,7 @@ | ||||||
|   inherit (builtins) attrNames; |   inherit (builtins) attrNames; | ||||||
|   inherit (lib.options) mkEnableOption mkOption; |   inherit (lib.options) mkEnableOption mkOption; | ||||||
|   inherit (lib.types) either listOf package str enum; |   inherit (lib.types) either listOf package str enum; | ||||||
|  |   inherit (lib.meta) getExe; | ||||||
|   inherit (lib.modules) mkIf mkMerge; |   inherit (lib.modules) mkIf mkMerge; | ||||||
|   inherit (lib.lists) isList; |   inherit (lib.lists) isList; | ||||||
|   inherit (lib.nvim.types) mkGrammarOption; |   inherit (lib.nvim.types) mkGrammarOption; | ||||||
|  | @ -35,14 +36,6 @@ | ||||||
|   formats = { |   formats = { | ||||||
|     fantomas = { |     fantomas = { | ||||||
|       package = pkgs.fantomas; |       package = pkgs.fantomas; | ||||||
|       nullConfig = '' |  | ||||||
|         table.insert( |  | ||||||
|           ls_sources, |  | ||||||
|           null_ls.builtins.formatting.fantomas.with({ |  | ||||||
|             command = "${cfg.format.package}/bin/fantomas", |  | ||||||
|           }) |  | ||||||
|         ) |  | ||||||
|       ''; |  | ||||||
|     }; |     }; | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|  | @ -102,8 +95,13 @@ in { | ||||||
|     }) |     }) | ||||||
| 
 | 
 | ||||||
|     (mkIf cfg.format.enable { |     (mkIf cfg.format.enable { | ||||||
|       vim.lsp.null-ls.enable = true; |       vim.formatter.conform-nvim = { | ||||||
|       vim.lsp.null-ls.sources.fsharp-format = formats.${cfg.format.type}.nullConfig; |         enable = true; | ||||||
|  |         setupOpts.formatters_by_ft.fsharp = [cfg.format.type]; | ||||||
|  |         setupOpts.formatters.${cfg.format.type} = { | ||||||
|  |           command = getExe cfg.format.package; | ||||||
|  |         }; | ||||||
|  |       }; | ||||||
|     }) |     }) | ||||||
|   ]); |   ]); | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Ching Pei Yang
				Ching Pei Yang