Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/nobbz/lua/nobbz/health.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ end
---but makes it required when a relevant filetype is opened
---@param lsp string the name of the LSP server as defined in lspconfig
M.register_lsp = function(lsp)
local config = require("lspconfig")[lsp]
local config = vim.lsp.config[lsp]
local program = config.cmd[1]
local pattern = config.filetypes[1]

Expand Down
4 changes: 2 additions & 2 deletions plugins/nobbz/lua/nobbz/lsp.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
local null_ls = require("null-ls")
local lspconfig = require("lspconfig")
local helpers = require("nobbz.lsp.helpers")
local register_lsp = require("nobbz.health").register_lsp

Expand Down Expand Up @@ -72,7 +71,8 @@ for _, client_module in ipairs(clients) do
filetypes = client_config.filetypes,
}

lspconfig[name].setup(setup)
vim.lsp.config(name, setup)
vim.lsp.enable(name)
Comment on lines +74 to +75
Copy link

Copilot AI Jun 21, 2025

Choose a reason for hiding this comment

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

There is no vim.lsp.config(name, setup) function in the built-in API; you likely need to call vim.lsp.start_client(setup) or use the documented vim.lsp.start(config) method instead.

Suggested change
vim.lsp.config(name, setup)
vim.lsp.enable(name)
vim.lsp.start(setup)

Copilot uses AI. Check for mistakes.
Copy link
Owner Author

Choose a reason for hiding this comment

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

According to https://neovim.io/doc/user/lsp.html#lsp-quickstart, vim.lsp.config and vim.lsp.enable do exist.


Comment on lines +74 to 76
Copy link

Copilot AI Jun 21, 2025

Choose a reason for hiding this comment

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

vim.lsp.enable is not a standard Neovim LSP API call; if you’re trying to attach or start the server, use vim.lsp.start_client or the appropriate attach function.

Suggested change
vim.lsp.config(name, setup)
vim.lsp.enable(name)
vim.lsp.start_client(setup)

Copilot uses AI. Check for mistakes.
register_lsp(client_config.name)

Expand Down