mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-26 09:20:08 +00:00 
			
		
		
		
	Merge pull request #606 from iynaix/add-nixd-opts
languages/nix: add lsp options support for nixd
This commit is contained in:
		
				commit
				
					
						ae677cebfa
					
				
			
		
					 2 changed files with 14 additions and 2 deletions
				
			
		|  | @ -149,3 +149,8 @@ | ||||||
| [nezia1](https://github.com/nezia1) | [nezia1](https://github.com/nezia1) | ||||||
| 
 | 
 | ||||||
| - Add support for [nixd](https://github.com/nix-community/nixd) language server. | - Add support for [nixd](https://github.com/nix-community/nixd) language server. | ||||||
|  | 
 | ||||||
|  | [iynaix](https://github.com/iynaix) | ||||||
|  | 
 | ||||||
|  | - Add lsp options support for [nixd](https://github.com/nix-community/nixd) | ||||||
|  |   language server. | ||||||
|  |  | ||||||
|  | @ -10,9 +10,9 @@ | ||||||
|   inherit (lib.modules) mkIf mkMerge; |   inherit (lib.modules) mkIf mkMerge; | ||||||
|   inherit (lib.lists) isList; |   inherit (lib.lists) isList; | ||||||
|   inherit (lib.strings) optionalString; |   inherit (lib.strings) optionalString; | ||||||
|   inherit (lib.types) enum either listOf package str; |   inherit (lib.types) anything attrsOf enum either listOf nullOr package str; | ||||||
|   inherit (lib.nvim.types) mkGrammarOption diagnostics; |   inherit (lib.nvim.types) mkGrammarOption diagnostics; | ||||||
|   inherit (lib.nvim.lua) expToLua; |   inherit (lib.nvim.lua) expToLua toLuaObject; | ||||||
|   inherit (lib.nvim.languages) diagnosticsToLua; |   inherit (lib.nvim.languages) diagnosticsToLua; | ||||||
| 
 | 
 | ||||||
|   cfg = config.vim.languages.nix; |   cfg = config.vim.languages.nix; | ||||||
|  | @ -87,6 +87,7 @@ | ||||||
|                 command = {"${cfg.format.package}/bin/nixfmt"}, |                 command = {"${cfg.format.package}/bin/nixfmt"}, | ||||||
|               }, |               }, | ||||||
|             ''} |             ''} | ||||||
|  |           options = ${toLuaObject cfg.lsp.options}, | ||||||
|             }, |             }, | ||||||
|           }, |           }, | ||||||
|         ''} |         ''} | ||||||
|  | @ -173,6 +174,12 @@ in { | ||||||
|         type = either package (listOf str); |         type = either package (listOf str); | ||||||
|         default = servers.${cfg.lsp.server}.package; |         default = servers.${cfg.lsp.server}.package; | ||||||
|       }; |       }; | ||||||
|  | 
 | ||||||
|  |       options = mkOption { | ||||||
|  |         type = nullOr (attrsOf anything); | ||||||
|  |         default = null; | ||||||
|  |         description = "Options to pass to nixd LSP server"; | ||||||
|  |       }; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     format = { |     format = { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 GitHub
					GitHub