mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 11:02:37 +00:00 
			
		
		
		
	Merge pull request #547 from NotAShelf/deprecate-rnix
languages/nix: deprecate rnix language server option
This commit is contained in:
		
				commit
				
					
						c8dbcde66a
					
				
			
		
					 5 changed files with 21 additions and 95 deletions
				
			
		|  | @ -26,22 +26,6 @@ | |||
|     then expToLua package | ||||
|     else ''{"${package}/bin/${defaultCmd}"}''; | ||||
|   servers = { | ||||
|     rnix = { | ||||
|       package = pkgs.rnix-lsp; | ||||
|       internalFormatter = cfg.format.type == "nixpkgs-fmt"; | ||||
|       lspConfig = '' | ||||
|         lspconfig.rnix.setup{ | ||||
|           capabilities = capabilities, | ||||
|         ${ | ||||
|           if (cfg.format.enable && cfg.format.type == "nixpkgs-fmt") | ||||
|           then useFormat | ||||
|           else noFormat | ||||
|         }, | ||||
|           cmd = ${packageToCmd cfg.lsp.package "rnix-lsp"}, | ||||
|         } | ||||
|       ''; | ||||
|     }; | ||||
| 
 | ||||
|     nil = { | ||||
|       package = pkgs.nil; | ||||
|       internalFormatter = true; | ||||
|  | @ -165,6 +149,7 @@ in { | |||
|         type = enum (attrNames formats); | ||||
|         default = defaultFormat; | ||||
|       }; | ||||
| 
 | ||||
|       package = mkOption { | ||||
|         description = "Nix formatter package"; | ||||
|         type = package; | ||||
|  | @ -188,7 +173,18 @@ in { | |||
|       assertions = [ | ||||
|         { | ||||
|           assertion = cfg.format.type != "nixpkgs-fmt"; | ||||
|           message = "nixpkgs-fmt has been archived upstream. Please use one of the following instead: ${concatStringsSep ", " (attrNames formats)}"; | ||||
|           message = '' | ||||
|             nixpkgs-fmt has been archived upstream. Please use one of the following available formatters: | ||||
|             ${concatStringsSep ", " (attrNames formats)} | ||||
|           ''; | ||||
|         } | ||||
| 
 | ||||
|         { | ||||
|           assertion = cfg.lsp.server != "rnix"; | ||||
|           message = '' | ||||
|             rnix-lsp has been archived upstream. Please use one of the following available language servers: | ||||
|             ${concatStringsSep ", " (attrNames servers)} | ||||
|           ''; | ||||
|         } | ||||
|       ]; | ||||
|       vim.pluginRC.nix = '' | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 GitHub
					GitHub