Skip to content
Open
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
6 changes: 3 additions & 3 deletions lua/augment.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ M.start_client = function(command, notification_methods, workspace_folders)
config.workspace_folders = workspace_folders
end

local id = vim.lsp.start_client(config)
local id = vim.lsp.start(config)
return id
end

Expand All @@ -57,7 +57,7 @@ M.notify = function(client_id, method, params)
return
end

client.notify(method, params)
client:notify(method, params)

Choose a reason for hiding this comment

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

Switching to client:notify(...) will pass the client table as the first argument, but Neovim’s LSP client client.notify is typically called with dot notation (client.notify(method, params)) and does not expect self; this can shift arguments and break the call. Consider keeping the dot call here.

🤖 React with 👍 or 👎 to let us know if the comment was useful.

end

-- Send a lsp request
Expand All @@ -68,7 +68,7 @@ M.request = function(client_id, method, params)
return
end

local _, id = client.request(method, params, function(err, result)
local _, id = client:request(method, params, function(err, result)

Choose a reason for hiding this comment

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

Similarly, client:request(...) will pass self and shift parameters; Neovim LSP usage expects client.request(method, params, handler, bufnr) with dot notation. This change is likely to cause request failures at runtime.

🤖 React with 👍 or 👎 to let us know if the comment was useful.

vim.call('augment#client#NvimResponse', method, params, result, err)
end)
return id
Expand Down