Skip to content

Mason V.2 does not load the custom LSP server settings. #1728

Description

@feekApp

I have a Neovim config build on this kickstart configuration. Since the release of Mason V.2 I had some issues and a long time I have pinned the version to the old v.1.

Because Mason V.2 is more stable lately, I wanted to give it another try. But I noticed that the custom LSP settings as set in local servers = {} were not loaded.

Because Mason makes use of the Neovim build-in LSP functions, it seems like there should be an additional config for the custom LSP settings. After some trial and error the following is working for me. By adding the following loop after the require('mason-lspconfig').setup {}:

for name, config in pairs(servers) do
	vim.lsp.config(name, config)
end

all custom settings are loaded again using Mason V.2 (for me).

Maybe also require('lspconfig')[server_name].setup(server) should be replaced by vim.lsp.enable( server_name )

I expect there is a better way to implement this to this repository 🤣

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions