Skip to content

Commit

Permalink
jump_to_location -> show_document
Browse files Browse the repository at this point in the history
I'd noticed the former was pretty useless as all it does is basically
call the latter. Seems like now it's been officially deprecated
upstream in 0.11.

Refs: neovim/neovim#30877
  • Loading branch information
Julian committed Oct 29, 2024
1 parent 825ba50 commit 7cedb02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lua/lean/infoview/components.lua
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ local function code_with_infos(t, sess)
vim.api.nvim_set_current_win(this_window)
end

vim.lsp.util.jump_to_location(links[1], 'utf-16')
vim.lsp.util.show_document(links[1], 'utf-16', { focus = true })
if #links > 1 then
vim.fn.setqflist({}, ' ', {
title = 'LSP locations',
Expand Down
5 changes: 3 additions & 2 deletions lua/lean/widgets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,10 @@ implement('GoToModuleLink', function(_, props)
end
---@type lsp.Position
local start = { line = 0, character = 0 }
vim.lsp.util.jump_to_location(
vim.lsp.util.show_document(
{ uri = uri, range = { start = start, ['end'] = start } },
'utf-16'
'utf-16',
{ focus = true }
)
end,
},
Expand Down

0 comments on commit 7cedb02

Please sign in to comment.