diff options
Diffstat (limited to 'lua/alpha/lsp/mason.lua')
| -rw-r--r-- | lua/alpha/lsp/mason.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lua/alpha/lsp/mason.lua b/lua/alpha/lsp/mason.lua index e164562..161a205 100644 --- a/lua/alpha/lsp/mason.lua +++ b/lua/alpha/lsp/mason.lua @@ -7,9 +7,8 @@ mason.setup() local mason_servers = {} --- TODO: can be improve checking the setup function to see if sets the cmd for server, _ in pairs(servers) do - local cmd = lspconfig[server].document_config.default_config.cmd[1] + local cmd = lspconfig[server].cmd[1] if vim.fn.executable(cmd) == 0 then table.insert(mason_servers, server) end @@ -21,5 +20,7 @@ mason_lspconfig.setup { -- filter the list for the ones not globally installed require("mason-tool-installer").setup { - ensure_installed = require "alpha.lsp.tools", + ensure_installed = vim.tbl_filter(function (tool) + return vim.fn.executable(tool) == 0 + end, require "alpha.lsp.tools"), } |