Repository navigation
fix(ex.lsp.single): replace deprecated get_buffers_by_client_id - #40
Conversation
Use client.attached_buffers instead of vim.lsp.get_buffers_by_client_id(), which is deprecated in Neovim 0.12 and removed in 0.13. Co-authored-by: Cursor <cursoragent@cursor.com>
|
It's doing fine on my local. Also I understand you may want backwards compat, but maybe you can open a branch for 0.13. Also I know it's AI and you can throw it to the bin for that reason, np! |
|
@icalvo Thanks for the PR! AI-generated code is not a problem by itself. I only care about the final Right now the formatting check is failing, as well as the test I also do not see an obvious backward compatibility issue. The project targets |
|
I didn't expect anything either way; I am just not knowledgeable enough about Neovim to know if the new API has been there long enough not to break any version you support. |
|
@icalvo Good job! Thank you! |
Summary
vim.lsp.get_buffers_by_client_id()withclient.attached_buffersinex.lsp.singleattached_bufferson mocked clients instead of stubbing the deprecated APIFixes the Neovim 0.12 deprecation warning (removed in 0.13) shown when the statusline refreshes after LSP attach.
Test plan
make test only=components/lsp_spec.luaget_buffers_by_client_idwarning in:checkhealth vim.deprecatedMade with Cursor