ui icon indicating copy to clipboard operation
ui copied to clipboard

lsasagas code action preview crashes tabuflilne with invalid buffer id.

Open Nirajgns opened this issue 1 year ago • 7 comments

....local/share/nvim/lazy/ui/lua/nvchad/tabufline/utils.lua:37: Invalid buffer id: 118 stack traceback: ^I[C]: in function 'buf_name' ^I....local/share/nvim/lazy/ui/lua/nvchad/tabufline/utils.lua:37: in function 'gen_unique_name' ^I....local/share/nvim/lazy/ui/lua/nvchad/tabufline/utils.lua:51: in function 'style_buf' ^I...ocal/share/nvim/lazy/ui/lua/nvchad/tabufline/modules.lua:74: in function <...ocal/share/nvim/lazy/ui/lua/nvchad/tabufline/modules.lua:60> ^I...ocal/share/nvim/lazy/ui/lua/nvchad/tabufline/modules.lua:117: in function <...ocal/share/nvim/lazy/ui/lua/nvchad/tabufline/modules.lua:107> ^I[C]: in function 'nvim_exec2' ^Ivim/_editor.lua: in function 'cmd' ^I.../share/nvim/lazy/nvim-notify/lua/notify/service/init.lua:63: in function 'push' ^I...ocal/share/nvim/lazy/nvim-notify/lua/notify/instance.lua:77: in function <...ocal/share/nvim/lazy/nvim-notify/lua/notify/instance.lua:41> ^I...e/nvim/lazy/noice.nvim/lua/noice/view/backend/notify.lua:169: in function '_notify' ^I...e/nvim/lazy/noice.nvim/lua/noice/view/backend/notify.lua:199: in function 'show' ^I...local/share/nvim/lazy/noice.nvim/lua/noice/view/init.lua:155: in function <...local/share/nvim/lazy/noice.nvim/lua/noice/view/init.lua:153> ^I[C]: in function 'xpcall' ^I...local/share/nvim/lazy/noice.nvim/lua/noice/util/call.lua:149: in function <...local/share/nvim/lazy/noice.nvim/lua/noice/util/call.lua:134> ^I...local/share/nvim/lazy/noice.nvim/lua/noice/view/init.lua:162: in function 'display' ^I.../share/nvim/lazy/noice.nvim/lua/noice/message/router.lua:223: in function <.../share/nvim/lazy/noice.nvim/lua/noice/message/router.lua:156> ^I[C]: in function 'xpcall' ^I...local/share/nvim/lazy/noice.nvim/lua/noice/util/call.lua:149: in function <...local/share/nvim/lazy/noice.nvim/lua/noice/util/call.lua:134> ^I[C]: in function 'pcall' ^I...local/share/nvim/lazy/noice.nvim/lua/noice/util/init.lua:146: in function '' ^Ivim/_editor.lua: in function '' ^Ivim/_editor.lua: in function <vim/_editor.lua:0>

Nirajgns avatar May 20 '24 14:05 Nirajgns

looks like a bug from lspsaga's end

siduck avatar May 22 '24 00:05 siduck


vim.api.nvim_create_autocmd("BufAdd", {
  callback = function(args)
    if vim.bo[args.buf].buflisted then
      print(args.buf)
    end
  end,
}) 

image

So when i go through the actions window and when cursor is on 3rd , then the below window shows up

and then the above autocmd gets triggered, i dont see any buflisted buffer and yet it gets triggered!

@glepnir any idea?

siduck avatar May 22 '24 00:05 siduck

action preview buffer is not listed.

glepnir avatar May 22 '24 05:05 glepnir

action preview buffer is not listed.

yes i know, but try the autocmd, it still prints buf number cuz the buffer is listed, so weird

siduck avatar May 22 '24 09:05 siduck

can close . i had push a commit for fix. forget set it.

glepnir avatar May 22 '24 09:05 glepnir

can close . i had push a commit for fix. forget set it.

its happening again, weird

siduck avatar Jul 14 '24 13:07 siduck

can close . i had push a commit for fix. forget set it.

Good day @glepnir! It seems the issue still hasn't been resolved. Could you please take another look at it?

KevinNitroG avatar Jul 23 '24 16:07 KevinNitroG

no longer facing this issue. seems like he has fixed it!

siduck avatar Dec 19 '24 02:12 siduck

https://github.com/user-attachments/assets/9b2b5cb3-b244-480d-9239-c0ef49d6f1f6

@glepnir i still get this issue, but only for some files, weird. does lspsaga ignore buf events? i have no idea its buffers sneak through my bufferline's function ( which only filters listed buffers )

siduck avatar Jan 08 '25 06:01 siduck

emm I have been busy with the work of ins-completion in vim/neovim core. So I haven't maintained the plugin for a long time. The new lspsaga refactoring is in progress :)

glepnir avatar Jan 08 '25 09:01 glepnir

emm I have been busy with the work of ins-completion in vim/neovim core. So I haven't maintained the plugin for a long time. The new lspsaga refactoring is in progress :)

oh all good man, Thanks for all your work!

siduck avatar Jan 08 '25 09:01 siduck

@andradei wait for a while till lspsaga rewrite is done. in the time being use https://github.com/rachartier/tiny-code-action.nvim

siduck avatar Jan 20 '25 16:01 siduck

Thank you both @glepnir and @glepnir for your work, time, and care on your projects.

andradei avatar Jan 21 '25 13:01 andradei