nvimdev / nvimdev/lspsaga.nvim

`Lspsaga diagnostic_jump_next` doesn't show current cursor diagnostic; instead it jumps to the next diagnostic

Open
#1,467 4 comments 0 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

https://github.com/nvimdev/lspsaga.nvim/assets/57322459/334a773e-1e76-45a2-a155-8e0e88f2e370

According to the doc:

Invoke :Lspsaga diagnostic_jump_next and :Lspsaga diagnostic_jump_prev to jump around diagnostics. When the current cursor position has a diagnostic available, the commands will show the diagnostic in a nice float.

Steps to reproduce

Test with below:

unction greet() {
  console.log("Hello World!");
}

greet();
  1. Cursor is at unction
  2. Run Lspsaga diagnostic_jump_next

Expect to show Unknown keyword or identifier. Did you mean 'function'?
Instead, it jumps to the next diagnostic and gives ';' expected. 1:17:1 tsserver 1005

Expected behavior

When the current cursor position has a diagnostic available, the commands will show the diagnostic in a nice float.

Neovim version (nvim -v)

v0.10.0

lspsaga commit

6f920cf

Terminal name/version

kitty 0.35.1

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 the :Lspsaga diagnostic_jump_next command and reproduce the behavior with the JavaScript snippet from the issue. Trace how the command handles a diagnostic under the cursor versus moving to the next diagnostic, then verify that the current diagnostic opens in a float and that navigation still advances when none is present.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, neovim
Domain
developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.