nvimdev / nvimdev/lspsaga.nvim
Ability to manually reset `pending_request` flag
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 3.8k
- Forks
- 308
- PR merge metrics
- No merged PRs in 30d
Description
Is your feature request related to a problem? Please describe.
Unfortunately, I've sometimes gotten lsp-saga stuck on a code action such that I requested it and then some error caused it to abort. I am however not able to reproduce this reliably (so far, it only happened in a buffer which suspiciously had a broken treesitter parser). This gets lsp-saga into a state where it can no longer process further code action requests. It would be nice to have an escape hatch for this.
Describe the solution you'd like
A command such as :Lspsaga reset_state could be introduced that reset the pending_request variable in codeaction and other places where such a variable is used.
Describe alternatives you've considered
Restarting Neovim is the only solution I'm aware of at the moment. Obviously, the best solution would be to address the root cause, but as I've mentioned I haven't been able to reliably invoke this behavior. I'll open another issue in case I find out more here. Additionally, this system is inherently a little prone to this breakage, so being able to do a clean reset is probably handy anyways.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the codeaction request handling and every place where a pending_request state is used; the issue names no files or tests. Check how existing Lspsaga commands are registered, then define what a reset_state command must clear and verify that subsequent code action requests work again.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100