Skip to content

ltex-ls-plus settings are not passed to LSP-Server #1525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
transporsche opened this issue May 11, 2025 · 6 comments
Closed

ltex-ls-plus settings are not passed to LSP-Server #1525

transporsche opened this issue May 11, 2025 · 6 comments

Comments

@transporsche
Copy link

local servers = {
        ltex_plus = {
          settings = {
            ltex = {
              language =  'de-DE',
            },
          },
        },

Hello guys, i dont know if i am right here. i tried to setup the ltex_plus LSP with a different language as shown above.
i just want to set the language for *.tx files to german because i have multiple tex files in one project. for some reason the settings are not passed to the LSP. can someone help me plz?

@ryanMeredith
Copy link

I don't think any of my configs set in server are being read. I think the recent Mason update has changed something..

@tiham93
Copy link

tiham93 commented May 13, 2025

Yeah, even the default enabled lua_ls settings aren't overriden.
It seems this commit on mason-lspconfig removed handler functionality so the handler function in mason-lspconfig's setup is no longer used
mason-org/mason-lspconfig.nvim@80f2cd7

@tiham93
Copy link

tiham93 commented May 13, 2025

You can call vim.lsp.config manually after require('mason_lspconfig').setup()

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

@transporsche
Copy link
Author

thank you very much, ill have a look

@SetsuikiHyoryu
Copy link

SetsuikiHyoryu commented May 13, 2025

Pull request #1475 focuses on addressing this issue.

In comment #1475 (comment), it’s mentioned that mason-lspconfig 2.0 removed handlers and set_handlers, which caused the original kickstart setup to stop working:

You can try using the native LSP method introduced in Neovim 0.11 to start the server:

-- You can use these calling outside of any setup {} block.
vim.lsp.config(server_name, config)
vim.lsp.enable(server_name)

If you’re also keeping the mason-lspconfig.setup calling, it will internally call vim.lsp.enable for you, so you don't need to write vim.lsp.enable yourself in that case.

@somallg
Copy link

somallg commented May 17, 2025

my quick fix is to pin mason to v1 until PR #1475 is merged

      { 'mason-org/mason.nvim', opts = {}, version = '^1.0.0' },
      { 'mason-org/mason-lspconfig.nvim', version = '^1.0.0' },

Make sure to run Lazy sync

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants