diff options
| author | kylo252 <[email protected]> | 2022-01-10 09:59:20 +0100 | 
|---|---|---|
| committer | kylo252 <[email protected]> | 2022-01-10 09:59:20 +0100 | 
| commit | 579064b88119538d0a13edf798d1a4f8875b6472 (patch) | |
| tree | fd40e3ddef76a83a4c96c03457e9834777379c0d /tests | |
| parent | 8fe7cf2fac461b2136e815e3107b434cd407a09d (diff) | |
| parent | ec1e4140fa4156df50785da5d6297145762a7daa (diff) | |
Merge branch 'rolling'
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/minimal_lsp.lua | 19 | 
1 files changed, 8 insertions, 11 deletions
| diff --git a/tests/minimal_lsp.lua b/tests/minimal_lsp.lua index 1c496c5a..660f824b 100644 --- a/tests/minimal_lsp.lua +++ b/tests/minimal_lsp.lua @@ -74,11 +74,12 @@ _G.load_config = function()      buf_set_keymap("n", "<space>lI", "<cmd>LspInstallInfo<CR>", opts)    end -  -- Add the server that troubles you here, e.g. "sumneko_lua", "pyright", "tsserver" -  local name = "clangd" +  -- Add the server that troubles you here, e.g. "clangd", "pyright", "tsserver" +  local name = "sumneko_lua" -  -- You need to specify the server's command manually -  local cmd +  local setup_opts = { +    on_attach = on_attach, +  }    if use_lsp_installer then      local server_available, server = require("nvim-lsp-installer.servers").get_server(name) @@ -86,22 +87,18 @@ _G.load_config = function()        server:install()      end      local default_opts = server:get_default_options() -    cmd = default_opts.cmd +    setup_opts.cmd_env = default_opts.cmd_env    end    if not name then      print "You have not defined a server name, please edit minimal_init.lua"    end -  if not nvim_lsp[name].document_config.default_config.cmd and not cmd then +  if not nvim_lsp[name].document_config.default_config.cmd and not setup_opts.cmd then      print [[You have not defined a server default cmd for a server        that requires it please edit minimal_init.lua]]    end -  nvim_lsp[name].setup { -    cmd = cmd, -    on_attach = on_attach, -  } - +  nvim_lsp[name].setup(setup_opts)    print [[You can find your log at $HOME/.cache/nvim/lsp.log. Please paste in a github issue under a details tag as described in the issue template.]]  end | 
