nvimdev / nvimdev/lspsaga.nvim

When outline is shown, every time I close a buffer, I got this error.

Open
#1,499 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Lua
Stars
3.8k
Forks
308
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

Using Astronvim, when ever I close a buff, I got this error.

Error executing vim.schedule lua callback: ...re/nvim/lazy/lspsaga.nvim/lua/lspsaga/symbol/outline.lua:203: Invalid 'buffer': Expected Lua number
stack traceback:
	[C]: in function 'nvim_buf_delete'
	...re/nvim/lazy/lspsaga.nvim/lua/lspsaga/symbol/outline.lua:203: in function ''
	vim/_editor.lua: in function ''
	vim/_editor.lua: in function <vim/_editor.lua:0>
Steps to reproduce

Using Astronvim with community lspsaga receipt, when I have the outline opened, and try to close a java buffer, I got the error.

Expected behavior

If the closed buffer is not the last buffer, the lspsaga outline should keep showing the outline for the current buff. If its the last buff, then I guess we should close the outline as well?

Neovim version (nvim -v)

0.10.0

lspsaga commit

d027f8b

Terminal name/version

western

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at lua/lspsaga/symbol/outline.lua line 203 and reproduce the error with the outline open while closing a Java buffer in Neovim 0.10.0. Trace the scheduled callback and verify the outline remains attached to the current buffer, or closes when the last buffer is closed, without the invalid-buffer error.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, neovim
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.