Skip to content

Comments

fix ls_lua#1903

Open
wabk6 wants to merge 2 commits intonvim-lua:masterfrom
wabk6:master
Open

fix ls_lua#1903
wabk6 wants to merge 2 commits intonvim-lua:masterfrom
wabk6:master

Conversation

@wabk6
Copy link

@wabk6 wabk6 commented Feb 24, 2026


NOTE
Please verify that the base repository above has the intended destination!
Github by default opens Pull Requests against the parent of a forked repository.
If this is your personal fork and you didn't intend to open a PR for contribution
to the original project then adjust the base repository accordingly.


Copilot AI review requested due to automatic review settings February 24, 2026 18:27
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR attempts to fix Lua language server configuration by changing references from lua_ls to lua-language-server across comments, Mason installation configuration, and LSP setup calls.

Changes:

  • Updated documentation comment to reference lua-language-server instead of lua_ls
  • Changed Mason ensure_installed entry from lua_ls to lua-language-server
  • Modified vim.lsp.config() and vim.lsp.enable() calls to use lua-language-server instead of lua_ls

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, {
'lua_ls', -- Lua Language server
'lua-language-server', -- Lua Language server
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential naming inconsistency: Using 'lua-language-server' (Mason package name) instead of 'lua_ls' (LSP server name). While 'lua-language-server' is correct for Mason's ensure_installed list, the vim.lsp.config() and vim.lsp.enable() calls below (lines 631 and 655) may require the LSP server name 'lua_ls' instead, similar to how other servers in the commented examples above use server names like 'gopls', 'rust_analyzer', and 'ts_ls' (lines 597-605). Please verify that both the Mason package name AND the LSP server name are correctly specified in their respective contexts.

Copilot uses AI. Check for mistakes.

-- Special Lua Config, as recommended by neovim help docs
vim.lsp.config('lua_ls', {
vim.lsp.config('lua-language-server', {
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential incorrect server name: 'lua-language-server' appears to be the Mason package name rather than the LSP server name. With nvim-lspconfig loaded (line 478), vim.lsp.config() typically expects server names like 'lua_ls' (the nvim-lspconfig server name), not Mason package names. The commented server examples above (lines 596-605) use server names like 'gopls', 'rust_analyzer', 'ts_ls' - all following the nvim-lspconfig naming convention with underscores. Please verify whether 'lua-language-server' or 'lua_ls' is the correct server name for vim.lsp.config() in this context.

Suggested change
vim.lsp.config('lua-language-server', {
vim.lsp.config('lua_ls', {

Copilot uses AI. Check for mistakes.
},
})
vim.lsp.enable 'lua_ls'
vim.lsp.enable 'lua-language-server'
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential incorrect server name: 'lua-language-server' appears to be the Mason package name rather than the LSP server name. With nvim-lspconfig loaded (line 478), vim.lsp.enable() typically expects server names like 'lua_ls' (the nvim-lspconfig server name), not Mason package names. The loop above (lines 624-628) passes server names from the servers table to vim.lsp.enable(), and those examples use names like 'gopls', 'rust_analyzer', 'ts_ls'. Please verify whether 'lua-language-server' or 'lua_ls' is the correct server name for vim.lsp.enable() in this context.

Copilot uses AI. Check for mistakes.
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

Successfully merging this pull request may close these issues.

1 participant