0

I am trying to include lua_ls on my lspconfig but I am getting this error [lspconfig] Cannot access configuration for lua_ls. Ensure this server is listed in `server_configurations.md` or added as a custom server.

It will only appear after I add lua_ls to ensured_installed on mason-lspconfig.

I`m using mason and lazy.nvim for plugin manager.

Here is my mason-lspconfig setup

{
        "williamboman/mason-lspconfig.nvim",
        config = function()
            require("mason-lspconfig").setup({
                ensure_installed = {
                    "angularls",
                    "bashls",
                    "cssls",
                    "eslint",
                    "gopls",
                    "html",
                    "jsonls",
                    "lua_ls",
                    "rust_analyzer",
                    "svelte",
                    "tailwindcss",
                    "tsserver",
                    "yamlls",
                },
            })
        end,
    },

1 Answer 1

0

The problem was my lazy.nvim config, removing the defaults.version="*" config of lazy.nvim fix the issue, because it was installing the stable version of lspconfig that is not compitable with the latest mason-lspconfig.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.