Skip to content

Commit

Permalink
fix: document link match rule
Browse files Browse the repository at this point in the history
  • Loading branch information
0x7a7a committed Jul 21, 2024
1 parent f3d8777 commit 5b102a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/gx/handlers/go.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ local function request_hover_info()
return vim.lsp.buf_request_sync(0, method, params)
end

-- TODO check if it is an internal pkg
local function get_link_from_response(res_tbl)
local res = res_tbl[1]
if res and res.result then
local value = res.result.contents.value
return value:match("https://pkg%.go%.dev[%w/]+")
return value:match("https://pkg%.go%.dev[%w.#/]+")
end
return nil
end
Expand Down

0 comments on commit 5b102a7

Please sign in to comment.