Skip to content

mason equivalent to get_installed_servers() #74

Discussion options

You must be logged in to vote

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

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
}

Also, currently I can setup mason-lspconfig to auto-install LSP servers, but what about non-LSP-servers? Are there plans to help with auto-installing those? or is the recommended way…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@WhoIsSethDaniel
Comment options

@williamboman
Comment options

Answer selected by WhoIsSethDaniel
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants