nvimdev / lspsaga.nvim

improve neovim lsp experience
MIT License
3.37k stars 285 forks source link

Add option to disable action preview on diagnostic jumps #1446

Closed taketwo closed 1 month ago

taketwo commented 1 month ago

Is your feature request related to a problem? Please describe.

Until recently, jumping between diagnostic messages displayed a float window with diagnostic text and available code actions. This float window was anchored above or below the problematic code line. Therefore, after a jump, I had a clear view of the problematic code line, a bit of context above or below, and available actions:

image

With current HEAD version, I started getting action preview diff as well, which is anchored on the opposite side of the problematic code line. As a result, I see neither the code line itself, nor any context around it. This makes it hard to comprehend where I jumped and what is the issue:

image

Describe the solution you'd like

Personally, I don't need to see action preview, so I'd like to have an option to disable it. For those who find the action preview useful, I guess it would be more convenient if the floating windows were attached above/below the problematic code line such that the line itself is not occluded by the floats.

glepnir commented 1 month ago

because it default to select first action. i think we can add an option to do it

glepnir commented 1 month ago

add diagnsotic.auto_preview default true you can set false to disable and you can still use <C-f> and <C-b> to show aciton preview

taketwo commented 1 month ago

This solves my problem, thanks for the prompt response!

glepnir commented 1 month ago

Tip. you can set FloatBorder color

taketwo commented 1 month ago

Not sure I understand what you mean :smile:

glepnir commented 1 month ago

:hi FloatBorder guifg=blue give it a try then

taketwo commented 1 month ago

Oh, I see what you mean, thanks :+1: