mason equivalent to get_installed_servers() #74
-
Currently, for setting up my LSP servers, I do something like this:
That seems fairly involved (at least when compared to Also, currently I can setup |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hello! I've recently added I'd recommend not accessing Try something like local m = require("mason-lspconfig")
m.setup {
ensure_installed = { 'bashls', 'sumneko_lua', 'perlnavigator', 'vimls', 'gopls' },
}
m.setup_handlers {
function (server_name)
require('lspconfig')[server_name].setup({...config...})
end
}
Most likely not, as this would wary greatly depending on how you define usage (ideally other plugins would provide this functionality). I'd ideally not have the |
Beta Was this translation helpful? Give feedback.
-
Hey @williamboman I think you should add this: m.setup_handlers {
function (server_name)
require('lspconfig')[server_name].setup({...config...})
end
} to readme of mason-lspconfig |
Beta Was this translation helpful? Give feedback.
Hello! I've recently added
:h mason-lspconfig
as well as this reference doc with (hopefully a helpful) diagram.I'd recommend not accessing
mason-lspconfig.mappings.server
directly as it's not considered public and is subject to breaking changes.Try something like