Ilia Choly
Ilia Choly
You can consistently get a bad buffer into `reattach_bufs` by deleting the buffer in the `on_init` callback. ``` lua local dummy = vim.lsp.start_client({ name = "dummy", cmd = { "dummylsp"...
@sapient-cogbag can you test out https://github.com/neovim/neovim/pull/28914 ?
@wookayin see https://github.com/neovim/neovim/pull/28913 TLDR: right now it's failing at the `changetracking.init`, but if we put a guard in `_text_document_did_open_handler`, then `_on_attach` will just fail further down because it's still dealing...
@sapient-cogbag please report back if the issue persist after applying #28914
@sapient-cogbag I cannot reproduce the error using your `minimal_init.lua`. I'm getting a different error: `Vim:E95: Buffer with this name already exists`.
How consistently can you reproduce this using your config?
@sapient-cogbag if you share your config + some setup/repro steps I can take a look.
Here's a minimal repro: https://github.com/icholy/nvim-lsp-bug-4 @zeertzjq can you re-open this?
The `on_detach` isn't called because this condition is hit https://github.com/neovim/neovim/blob/4f24e1b1d743a13f5a7b536f8acce9552143794d/runtime/lua/vim/lsp.lua#L580
@mfussenegger yeah that works. ``` diff diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua index 1592fd315..60b3f3e50 100644 --- a/runtime/lua/vim/lsp.lua +++ b/runtime/lua/vim/lsp.lua @@ -577,7 +577,8 @@ local function buf_attach(bufnr) api.nvim_buf_attach(bufnr, false, { on_lines = function(_,...