mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 02:52:37 +00:00 
			
		
		
		
	add ruby lsp as ruby server option
This commit is contained in:
		
					parent
					
						
							
								fee3bbe536
							
						
					
				
			
			
				commit
				
					
						a099cdaf97
					
				
			
		
					 1 changed files with 21 additions and 1 deletions
				
			
		|  | @ -9,6 +9,8 @@ | |||
|   inherit (lib.meta) getExe; | ||||
|   inherit (lib.modules) mkIf mkMerge; | ||||
|   inherit (lib.nvim.types) mkGrammarOption diagnostics; | ||||
|   inherit (lib.nvim.lua) expToLua; | ||||
|   inherit (lib.lists) isList; | ||||
|   inherit (lib.types) either listOf package str enum; | ||||
| 
 | ||||
|   cfg = config.vim.languages.ruby; | ||||
|  | @ -24,10 +26,28 @@ | |||
|           flags = { | ||||
|             debounce_text_changes = 150, | ||||
|           }, | ||||
|           cmd = { "${pkgs.solargraph}/bin/solargraph", "stdio" } | ||||
|           cmd = ${ | ||||
|           if isList cfg.lsp.package | ||||
|           then expToLua cfg.lsp.package | ||||
|           else ''{ "${cfg.lsp.package}/bin/solargraph", "stdio" }'' | ||||
|         } | ||||
|         } | ||||
|       ''; | ||||
|     }; | ||||
|     rubylsp = { | ||||
|       package = pkgs.ruby-lsp; | ||||
|       lspConfig = '' | ||||
|         lspconfig.ruby_lsp.setup { | ||||
|           capabilities = capabilities, | ||||
|           on_attach = default_on_attach, | ||||
|           cmd = ${ | ||||
|           if isList cfg.lsp.package | ||||
|           then expToLua cfg.lsp.package | ||||
|           else ''{ "${cfg.lsp.package}/bin/ruby-lsp" }'' | ||||
|         } | ||||
|         } | ||||
|       ''; | ||||
|     } | ||||
|   }; | ||||
| 
 | ||||
|   # testing | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alexandra Østermark
				Alexandra Østermark