mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 02:52:37 +00:00 
			
		
		
		
	feat: make zig lsp install optional
This commit is contained in:
		
					parent
					
						
							
								3ca97bccbc
							
						
					
				
			
			
				commit
				
					
						2075211c18
					
				
			
		
					 1 changed files with 6 additions and 2 deletions
				
			
		|  | @ -21,7 +21,7 @@ in { | ||||||
| 
 | 
 | ||||||
|       package = mkOption { |       package = mkOption { | ||||||
|         description = "ZLS package"; |         description = "ZLS package"; | ||||||
|         type = types.package; |         type = with types; either package (listOf str); | ||||||
|         default = pkgs.zls; |         default = pkgs.zls; | ||||||
|       }; |       }; | ||||||
| 
 | 
 | ||||||
|  | @ -44,7 +44,11 @@ in { | ||||||
|         lspconfig.zls.setup { |         lspconfig.zls.setup { | ||||||
|           capabilities = capabilities, |           capabilities = capabilities, | ||||||
|           on_attach=default_on_attach, |           on_attach=default_on_attach, | ||||||
|           cmd = {"${cfg.lsp.package}/bin/zls"}, |           cmd = ${ | ||||||
|  |           if isList cfg.lsp.package | ||||||
|  |           then nvim.lua.expToLua cfg.lsp.package | ||||||
|  |           else ''{"${cfg.lsp.package}/bin/zls"}'' | ||||||
|  |         }, | ||||||
|           settings = { |           settings = { | ||||||
|             ["zls"] = { |             ["zls"] = { | ||||||
|               zig_exe_path = "${cfg.lsp.zigPackage}/bin/zig", |               zig_exe_path = "${cfg.lsp.zigPackage}/bin/zig", | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Ching Pei Yang
				Ching Pei Yang