Skip to content

lua_lsp configuration error. #1908

@Geez14

Description

@Geez14

Before Reporting an Issue

  • I have read the kickstart.nvim README.md.

  • I have read the appropriate plugin's documentation.

  • I have searched that this issue has not been reported before.

  • By checking this, I confirm that the above steps are completed. I understand leaving this unchecked will result in this report being closed immediately.

Describe the bug

lua_lsp fails to attach the buffer.
ISSUE: (#1884)
PR: (#1903)
the lsp_server still fails to attach to the buffer (client). Configuration validation error during runtime.

--[ERROR][2026-02-27 04:00:45] .../lua/vim/lsp.lua:509	'invalid "lua-language-server" config: /usr/share/nvim/runtime/lua/vim/lsp.lua:484: cmd: expected expected function or table with executable command, got nil'

when changed the vim.lsp.enable 'lua-language-server' (as per the resol

-- ~/.config/nvim/init.lua
      vim.lsp.config('lua-language-server', {
        on_init = function(client)
          if client.workspace_folders then
            local path = client.workspace_folders[1].name
            if path ~= vim.fn.stdpath 'config' and (vim.uv.fs_stat(path .. '/.luarc.json') or vim.uv.fs_stat(path .. '/.luarc.jsonc')) then return end
          end

          client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
            runtime = {
              version = 'LuaJIT',
              path = { 'lua/?.lua', 'lua/?/init.lua' },
            },
            workspace = {
              checkThirdParty = false,
              -- NOTE: this is a lot slower and will cause issues when working on your own configuration.
              --  See https://github.com/neovim/nvim-lspconfig/issues/3189
              library = vim.api.nvim_get_runtime_file('', true),
            },
          })
        end,
        settings = {
          Lua = {},
        },
      })
      vim.lsp.enable 'lua-language-server'
    end,
  },

value for the config it was giving:

[2026-02-27 04:17:17] .../lua/vim/lsp.lua:507	{ capabilities = { textDocument = { completion = { completionItem = { commitCharactersSupport = false, deprecatedSupport = true, documentationFormat = { "markdown", "plaintext" }, insertReplaceSupport = true, insertTextModeSupport = { valueSet = { 1 } }, labelDetailsSupport = true, preselectSupport = false, resolveSupport = { properties = { "documentation", "detail", "additionalTextEdits", "command", "data" } }, snippetSupport = true, tagSupport = { valueSet = { 1 } } }, completionList = { itemDefaults = { "commitCharacters", "editRange", "insertTextFormat", "insertTextMode", "data" } }, contextSupport = true, insertTextMode = 1 } } }, name = "lua-language-server", on_init = <function 1>, settings = { Lua = {} } }

Settings values are missing when vim.lsp.enable 'lua-language-server'
\b
But when I put vim.lsp.enable 'lua_ls' it works fine:

[2026-02-27 04:26:27] .../lua/vim/lsp.lua:507	 { capabilities = { textDocument = { completion = { completionItem = { commitCharactersSupport = false, deprecatedSupport = true, documentationFormat = { "markdown", "plaintext" }, insertReplaceSupport = true, insertTextModeSupport = { valueSet = { 1 } }, labelDetailsSupport = true, preselectSupport = false, resolveSupport = { properties = { "documentation", "detail", "additionalTextEdits", "command", "data" } }, snippetSupport = true, tagSupport = { valueSet = { 1 } } }, completionList = { itemDefaults = { "commitCharacters", "editRange", "insertTextFormat", "insertTextMode", "data" } }, contextSupport = true, insertTextMode = 1 } } }, cmd = { "lua-language-server" }, filetypes = { "lua" }, name = "lua_ls", root_markers = { { ".emmyrc.json", ".luarc.json", ".luarc.jsonc" }, { ".luacheckrc", ".stylua.toml", "stylua.toml", "selene.toml", "selene.yml" }, { ".git" } }, settings = { Lua = { codeLens = { enable = true }, hint = { enable = true, semicolon = "Disable" } } } }

Please check the `/usr/share/nvim/runtime/lua/vim/lsp.lua'.

To Reproduce

  1. Goto ~/.config/nvim/init.lua
  2. edit the lsp configuration of lua.
  3. set vim.lsp.enable 'lua-language-server'
  4. After refreshing the terminal and open any lua file or porject.
  5. It won't attach the lsp server to the buffer (or the client).

Desktop

  • OS: Linux VOILETDEVIL 6.12.73-1-MANJARO #1 SMP PREEMPT_DYNAMIC Mon, 16 Feb 2026 21:36:06 +0000 x86_64 GNU/Linux
  • Terminal: Alacritty, Konsole

Neovim Version

Image Image Image Image
NVIM v0.11.6
Build type: RelWithDebInfo
LuaJIT 2.1.1767980792

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