|  | @@ -3,29 +3,22 @@ vim.diagnostic.config({
 | 
	
		
			
				|  |  |    virtual_text = { severity = { min = vim.diagnostic.severity.WARN } },
 | 
	
		
			
				|  |  |  })
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -local capabilities = require('cmp_nvim_lsp').default_capabilities()
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -local nvim_lsp = require('lspconfig')
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -nvim_lsp.bashls.setup({
 | 
	
		
			
				|  |  | -  capabilities = capabilities,
 | 
	
		
			
				|  |  | -});
 | 
	
		
			
				|  |  | +vim.lsp.config('*', {
 | 
	
		
			
				|  |  | +  capabilities = require('cmp_nvim_lsp').default_capabilities(),
 | 
	
		
			
				|  |  | +})
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -nvim_lsp.eslint.setup({
 | 
	
		
			
				|  |  | -  capabilities = capabilities,
 | 
	
		
			
				|  |  | -});
 | 
	
		
			
				|  |  | +vim.lsp.enable("bashls");
 | 
	
		
			
				|  |  | +vim.lsp.enable("eslint");
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  if vim.fn.executable("dprint") == 1 then
 | 
	
		
			
				|  |  |    local version = vim.version.parse(vim.fn.system("dprint --version"))
 | 
	
		
			
				|  |  |    if vim.version.cmp(version, {0,45,0}) >= 0 then
 | 
	
		
			
				|  |  | -    nvim_lsp.dprint.setup({})
 | 
	
		
			
				|  |  | +    vim.lsp.enable("dprint")
 | 
	
		
			
				|  |  |    end
 | 
	
		
			
				|  |  |  end
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  if vim.fn.executable("deno") == 1 then
 | 
	
		
			
				|  |  | -  nvim_lsp.denols.setup({
 | 
	
		
			
				|  |  | -    capabilities = capabilities,
 | 
	
		
			
				|  |  | -  });
 | 
	
		
			
				|  |  | +  vim.lsp.enable("deno");
 | 
	
		
			
				|  |  |  else
 | 
	
		
			
				|  |  |    require('typescript').setup({
 | 
	
		
			
				|  |  |      server = {
 | 
	
	
		
			
				|  | @@ -37,7 +30,6 @@ else
 | 
	
		
			
				|  |  |            providePrefixAndSuffixTextForRename = false,
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | -      capabilities = capabilities,
 | 
	
		
			
				|  |  |        handlers = {
 | 
	
		
			
				|  |  |          ['$/typescriptVersion'] = function(err, result, ctx, config)
 | 
	
		
			
				|  |  |            vim.notify(string.format('Typescript %s', result.version))
 | 
	
	
		
			
				|  | @@ -57,53 +49,39 @@ else
 | 
	
		
			
				|  |  |  end
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  if vim.fn.executable("gopls") == 1 then
 | 
	
		
			
				|  |  | -  nvim_lsp.gopls.setup({
 | 
	
		
			
				|  |  | -    capabilities = capabilities,
 | 
	
		
			
				|  |  | -  });
 | 
	
		
			
				|  |  | +  vim.lsp.enable("gopls")
 | 
	
		
			
				|  |  |  end
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  if vim.fn.executable("ruby-lsp") == 1 then
 | 
	
		
			
				|  |  | -  nvim_lsp.ruby_lsp.setup({
 | 
	
		
			
				|  |  | -    capabilities = capabilities,
 | 
	
		
			
				|  |  | +  vim.lsp.config("ruby_lsp", {
 | 
	
		
			
				|  |  |      init_options = {
 | 
	
		
			
				|  |  |        enabledFeatures = {
 | 
	
		
			
				|  |  |          formatting = false,
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    })
 | 
	
		
			
				|  |  | +  vim.lsp.enable("ruby_lsp")
 | 
	
		
			
				|  |  |  end
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  if vim.fn.executable("nil") == 1 then
 | 
	
		
			
				|  |  | -  nvim_lsp.nil_ls.setup({
 | 
	
		
			
				|  |  | -    capabilities = capabilities,
 | 
	
		
			
				|  |  | -  });
 | 
	
		
			
				|  |  | +  vim.lsp.enable("nil_ls")
 | 
	
		
			
				|  |  |  end
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  if vim.fn.executable("jdtls") == 1 then
 | 
	
		
			
				|  |  | -  nvim_lsp.jdtls.setup({
 | 
	
		
			
				|  |  | -    capabilities = capabilities,
 | 
	
		
			
				|  |  | +  vim.lsp.config("jdtls", {
 | 
	
		
			
				|  |  |      handlers = {
 | 
	
		
			
				|  |  |        ["$/progress"] = function()
 | 
	
		
			
				|  |  |          -- this is quite noisy so just disable it
 | 
	
		
			
				|  |  |        end
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -  });
 | 
	
		
			
				|  |  | +  })
 | 
	
		
			
				|  |  | +  vim.lsp.enable("jdtls")
 | 
	
		
			
				|  |  |  end
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  -- custom LSP servers
 | 
	
		
			
				|  |  | -local configs = require('lspconfig.configs')
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -if not configs.elvish then
 | 
	
		
			
				|  |  | -  configs.elvish = {
 | 
	
		
			
				|  |  | -    default_config = {
 | 
	
		
			
				|  |  | -      cmd = {'elvish', '--lsp'},
 | 
	
		
			
				|  |  | -      filetypes = {'elvish'},
 | 
	
		
			
				|  |  | -      root_dir = nvim_lsp.util.root_pattern('*.elv'),
 | 
	
		
			
				|  |  | -      settings = {},
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | -  }
 | 
	
		
			
				|  |  | -end
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -nvim_lsp.elvish.setup({
 | 
	
		
			
				|  |  | -  capabilities = capabilities,
 | 
	
		
			
				|  |  | +vim.lsp.config("elvish", {
 | 
	
		
			
				|  |  | +  cmd = {'elvish', '--lsp'},
 | 
	
		
			
				|  |  | +  filetypes = {'elvish'},
 | 
	
		
			
				|  |  | +  settings = {},
 | 
	
		
			
				|  |  |  })
 | 
	
		
			
				|  |  | +vim.lsp.enable("elvish")
 |