mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 02:52:37 +00:00 
			
		
		
		
	language/ts: add conform and lint rules for tsx
This commit is contained in:
		
					parent
					
						
							
								e2b3daa6f8
							
						
					
				
			
			
				commit
				
					
						b7c08147e0
					
				
			
		
					 1 changed files with 8 additions and 3 deletions
				
			
		|  | @ -204,17 +204,22 @@ in { | ||||||
|     (mkIf cfg.format.enable { |     (mkIf cfg.format.enable { | ||||||
|       vim.formatter.conform-nvim = { |       vim.formatter.conform-nvim = { | ||||||
|         enable = true; |         enable = true; | ||||||
|         setupOpts.formatters_by_ft.typescript = [cfg.format.type]; |         setupOpts = { | ||||||
|         setupOpts.formatters.${cfg.format.type} = { |           formatters_by_ft.typescript = [cfg.format.type]; | ||||||
|  |           # .tsx files | ||||||
|  |           formatters_by_ft.typescriptreact = [cfg.format.type]; | ||||||
|  |           formatters.${cfg.format.type} = { | ||||||
|             command = getExe cfg.format.package; |             command = getExe cfg.format.package; | ||||||
|           }; |           }; | ||||||
|         }; |         }; | ||||||
|  |       }; | ||||||
|     }) |     }) | ||||||
| 
 | 
 | ||||||
|     (mkIf cfg.extraDiagnostics.enable { |     (mkIf cfg.extraDiagnostics.enable { | ||||||
|       vim.diagnostics.nvim-lint = { |       vim.diagnostics.nvim-lint = { | ||||||
|         enable = true; |         enable = true; | ||||||
|         linters_by_ft.typescript = cfg.extraDiagnostics.types; |         linters_by_ft.typescript = cfg.extraDiagnostics.types; | ||||||
|  |         linters_by_ft.typescriptreact = cfg.extraDiagnostics.types; | ||||||
| 
 | 
 | ||||||
|         linters = mkMerge (map (name: { |         linters = mkMerge (map (name: { | ||||||
|             ${name}.cmd = getExe diagnosticsProviders.${name}.package; |             ${name}.cmd = getExe diagnosticsProviders.${name}.package; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Ching Pei Yang
				Ching Pei Yang