aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/inline_completion.lua
diff options
context:
space:
mode:
authorskewb1k <skewb1kunix@gmail.com>2025-10-26 00:51:13 +0300
committerGitHub <noreply@github.com>2025-10-25 14:51:13 -0700
commite239179871c4543495eecaa4eee086d96174266a (patch)
tree2eab1fd42a8a4688d8d12aa241db123c96a3d406 /runtime/lua/vim/lsp/inline_completion.lua
parent5db35449917de353fb8e35cbd4edca381233f381 (diff)
downloadrneovim-e239179871c4543495eecaa4eee086d96174266a.tar.gz
rneovim-e239179871c4543495eecaa4eee086d96174266a.tar.bz2
rneovim-e239179871c4543495eecaa4eee086d96174266a.zip
fix(lsp): ensure bufnr is passed for buffer-local requests (#36325)
Problem: Some LSP method handlers were making requests without specifying a bufnr, defaulting to 0 (current). This works in most cases but fails when client attaches to background buffers, causing assertions in handlers to fail. Solution: Ensure bufnr is passed to Client.request for buffer-local methods.
Diffstat (limited to 'runtime/lua/vim/lsp/inline_completion.lua')
-rw-r--r--runtime/lua/vim/lsp/inline_completion.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/inline_completion.lua b/runtime/lua/vim/lsp/inline_completion.lua
index c067ca6d08..6853baf84d 100644
--- a/runtime/lua/vim/lsp/inline_completion.lua
+++ b/runtime/lua/vim/lsp/inline_completion.lua
@@ -284,7 +284,7 @@ function Completor:request(kind)
}
client:request('textDocument/inlineCompletion', params, function(...)
self:handler(...)
- end)
+ end, self.bufnr)
end
end