Skip to content
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

Server "lua_ls" is not a valid entry in ensure_installed. #474

Open
githubxone opened this issue Oct 19, 2024 · 3 comments
Open

Server "lua_ls" is not a valid entry in ensure_installed. #474

githubxone opened this issue Oct 19, 2024 · 3 comments

Comments

@githubxone
Copy link

I get below warning when I open neovim:

[mason.nvim] [mason-lspconfig.nvim] Server "lua_ls" is not a valid entry in ensure_installed. Make sure to only provide lspconfig server names. 

and this is my config:

return {
  "neovim/nvim-lspconfig",
  dependencies = {
        "williamboman/mason.nvim",
        "williamboman/mason-lspconfig",
  },

  config = function()
    local servers = {
      "lua_ls",  -- lua
      "clangd",  -- c cpp
      "pylsp",   -- python
    }

    local capabilities = require('cmp_nvim_lsp').default_capabilities()
    require("mason").setup({
      ui = {
        icons = {
          package_installed = "√",
          package_pending = "→",
          package_uninstalled = "×"
        }
      }
    })
    require("mason-lspconfig").setup({
      ensure_installed = servers,
    })
    require("lspconfig").lua_ls.setup {
      capabilities = capabilities,
    }
    require("lspconfig").clangd.setup {
      capabilities = capabilities,
    }
    require("lspconfig").pylsp.setup {
      capabilities = capabilities,
    }
  end
}
@monooso
Copy link

monooso commented Nov 25, 2024

I have the same issue.

I also tried intelephense, to confirm that the issue isn't specific to the Lua language server, and encountered the same error.

@joshaspinall
Copy link

@githubxone @monooso I have the same issue after trying multiple, valid entries. After a little digging, I note that Mason cannot install/update the registry with a Github API error. Is this the same for yourselves or do I need to raise a separate issue?

@joshaspinall
Copy link

@githubxone @monooso I have the same issue after trying multiple, valid entries. After a little digging, I note that Mason cannot install/update the registry with a Github API error. Is this the same for yourselves or do I need to raise a separate issue?

FYI I resolved my issue by installing curl on my system, as it was missing. Went through the results of checkhealth mason. Give that a go; hope to have been of some help!

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

3 participants