Skip to content

Commit 7cedb02

Browse files
committed
jump_to_location -> show_document
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
1 parent 825ba50 commit 7cedb02

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lua/lean/infoview/components.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ local function code_with_infos(t, sess)
212212
vim.api.nvim_set_current_win(this_window)
213213
end
214214

215-
vim.lsp.util.jump_to_location(links[1], 'utf-16')
215+
vim.lsp.util.show_document(links[1], 'utf-16', { focus = true })
216216
if #links > 1 then
217217
vim.fn.setqflist({}, ' ', {
218218
title = 'LSP locations',

lua/lean/widgets.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,10 @@ implement('GoToModuleLink', function(_, props)
132132
end
133133
---@type lsp.Position
134134
local start = { line = 0, character = 0 }
135-
vim.lsp.util.jump_to_location(
135+
vim.lsp.util.show_document(
136136
{ uri = uri, range = { start = start, ['end'] = start } },
137-
'utf-16'
137+
'utf-16',
138+
{ focus = true }
138139
)
139140
end,
140141
},

0 commit comments

Comments
 (0)