feat(lsp): add 'reuse_win' for reuse window options (#2454)

This commit is contained in:
暮晨
2023-05-24 17:21:16 +08:00
committed by GitHub
parent a709dbb5d5
commit 6dec8cf723
3 changed files with 11 additions and 1 deletions

View File

@@ -196,7 +196,8 @@ local function list_or_jump(action, title, opts)
vim.cmd "vnew"
end
end
vim.lsp.util.jump_to_location(flattened_results[1], offset_encoding)
vim.lsp.util.jump_to_location(flattened_results[1], offset_encoding, opts.reuse_win)
else
local locations = vim.lsp.util.locations_to_items(flattened_results, offset_encoding)
pickers