nvimdev / lspsaga.nvim

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

open finder reference in the calling window #1283

Closed defr0std closed 12 months ago

defr0std commented 1 year ago

This is a small convenience improvement. Currently, when the finder uses a normal layout with sp_global, the reference is always open ('toggle_or_open') in the leftmost window. This is quite inconvenient when working with multiple vertical splits. Imagine that you search for reference in the right split, and then the reference is open in the left split, which has a completely different context.

When the finder is open, we memorize the current window id. When the reference is opened, we use that window id instead of 0 (which by this time is already the leftmost).

For float layout, or normal with sp_global=false, there is no change in behavior.

glepnir commented 1 year ago

sorry for late . should check layout ? looks like only useful on float right ?

defr0std commented 12 months ago

No, this is useful only in normal layout with sp_global=true. In this case, the finder reference will be open in the window from which the finder was started. In all other use cases, there is no change in behavior.