Skip to content

Commit

Permalink
fix: wrong jumps for internal packages in imports
Browse files Browse the repository at this point in the history
  • Loading branch information
0x7a7a committed Jul 21, 2024
1 parent fed1ccc commit 4fc5eeb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/gx/handlers/go.lua
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ function M.handle()

local line = vim.api.nvim_buf_get_lines(0, start_line, end_line + 1, false)[1]
local pkg = line:sub(start_col + 2, end_col - 1) -- remove quotes
if is_internal(pkg) then
return nil
end

return "https://pkg.go.dev/" .. pkg
end
Expand Down

0 comments on commit 4fc5eeb

Please sign in to comment.