feat(lsp-jump-type): tab drop as new jump_type option for go-to LSP pickers (#2751)
This commit is contained in:
@@ -47,6 +47,8 @@ lsp.references = function(opts)
|
||||
vim.cmd "new"
|
||||
elseif opts.jump_type == "vsplit" then
|
||||
vim.cmd "vnew"
|
||||
elseif opts.jump_type == "tab drop" then
|
||||
vim.cmd("tab drop " .. locations[1].filename)
|
||||
end
|
||||
end
|
||||
-- jump to location
|
||||
@@ -197,6 +199,9 @@ local function list_or_jump(action, title, opts)
|
||||
vim.cmd "new"
|
||||
elseif opts.jump_type == "vsplit" then
|
||||
vim.cmd "vnew"
|
||||
elseif opts.jump_type == "tab drop" then
|
||||
local file_path = vim.uri_to_fname(flattened_results[1].uri)
|
||||
vim.cmd("tab drop " .. file_path)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user