diff options
| author | William Boman <william@redwill.se> | 2022-04-27 21:20:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-27 21:20:45 +0200 |
| commit | 090c8a87b31de5c5a21eebc55adb22ddab625015 (patch) | |
| tree | 3c92027c937bcca88547d2654d91f24574653634 /tests/minimal_debug_init.lua | |
| parent | run autogen_metadata.lua (diff) | |
| download | mason-090c8a87b31de5c5a21eebc55adb22ddab625015.tar mason-090c8a87b31de5c5a21eebc55adb22ddab625015.tar.gz mason-090c8a87b31de5c5a21eebc55adb22ddab625015.tar.bz2 mason-090c8a87b31de5c5a21eebc55adb22ddab625015.tar.lz mason-090c8a87b31de5c5a21eebc55adb22ddab625015.tar.xz mason-090c8a87b31de5c5a21eebc55adb22ddab625015.tar.zst mason-090c8a87b31de5c5a21eebc55adb22ddab625015.zip | |
feat: integrate with lspconfig's on_setup hook (#631)
* feat: integrate with lspconfig's on_setup hook
* fix!: don't use aliased installation directories if new .setup() fn is used
This makes it so servers are always installed in a directory name that
corresponds with the server name. The reason aliased installation directories
is supported is lost on me, but it's legacy and complicates things
unnecessarily.
This is a breaking change for users who previously were using the `.on_server_ready()`
hook, and now transitioned to setting up servers directly via lspconfig.
These users will need to reinstall the server.
* fix: block usage of the deprecated server:setup() method if new setup method is used
* fix: allow passing no arg to setup()
* docs: ok final.v3 readme
Diffstat (limited to 'tests/minimal_debug_init.lua')
| -rw-r--r-- | tests/minimal_debug_init.lua | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/tests/minimal_debug_init.lua b/tests/minimal_debug_init.lua index cd42ed24..f090b353 100644 --- a/tests/minimal_debug_init.lua +++ b/tests/minimal_debug_init.lua @@ -32,25 +32,21 @@ local function load_plugins() end function _G.load_config() - -- ================================================== - -- ======= MODIFY YOUR CONFIG HERE, IF NEEDED ======= - -- ================================================== - local lsp_installer = require "nvim-lsp-installer" + local lspconfig = require "lspconfig" local function on_attach(client, bufnr) vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc") end - require("nvim-lsp-installer").settings { + require("nvim-lsp-installer").setup { log = vim.log.levels.DEBUG, } - lsp_installer.on_server_ready(function(server) - server:setup { - on_attach = on_attach, - } - end) -- ================================================== + -- ========= SETUP RELEVANT SERVER(S) HERE! ========= + -- ================================================== + -- + -- lspconfig.sumneko_lua.setup { on_attach = on_attach } end if vim.fn.isdirectory(install_path) == 0 then |
