diff options
| author | Yi Ming <ofseed@foxmail.com> | 2026-03-30 22:54:55 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-30 10:54:55 -0400 |
| commit | 57797ed7d465afabf522df2f53e78e570b9e2833 (patch) | |
| tree | 737b8105ba9cc3352b2e4ffc12b819f9a34ca14a /scripts/lintcommit.lua | |
| parent | f062c6fd437e2e54b65a005c2d1b2858d4cab507 (diff) | |
| download | rneovim-57797ed7d465afabf522df2f53e78e570b9e2833.tar.gz rneovim-57797ed7d465afabf522df2f53e78e570b9e2833.tar.bz2 rneovim-57797ed7d465afabf522df2f53e78e570b9e2833.zip | |
feat(lsp): respect 'switchbuf' for jump commands, drop `reuse_win` #38510
Problem:
LSP jump operations such as `buf.definition`/`buf.type_definition` do
not follow the 'switchbuf' option. Instead their behavior is controlled
by `vim.lsp.LocationOpts.reuse_win`. When `reuse_win=true`, the effect
is very similar to `set switchbuf=useopen`.
Note that functions like `buf.definition` open the quickfix
window when there are multiple results, and jumping between quickfix
entries already follows 'switchbuf', so unifying the behavior is more
intuitive.
Solution:
Follow the 'switchbuf' option and drop `reuse_win`.
We can achieve this behavior by using :cfirst when the quickfix list has
only one item, rather than customizing the jump logic as before.
Diffstat (limited to 'scripts/lintcommit.lua')
0 files changed, 0 insertions, 0 deletions