Skip to content

Commit

Permalink
use vim.lsp.util.show_document (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
teatimeguest authored Oct 27, 2024
1 parent 11d7a71 commit 088c91e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/lsplinks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function M.open(uri)
return false
end
if uri:find("^file:/") then
util.jump_to_location({ uri = remove_uri_fragment(uri) }, "utf-8", true)
util.show_document({ uri = remove_uri_fragment(uri) }, "utf-8", { reuse_win = true, focus = true })
local line_no, col_no = uri:match(".-#(%d+),(%d+)")
if line_no then
api.nvim_win_set_cursor(0, { tonumber(line_no), tonumber(col_no) - 1 })
Expand Down

0 comments on commit 088c91e

Please sign in to comment.