fix(util): add and use forge link computation

Problem: There are many Git forges each with a different way of
  constructing permanent links to like commits and tags.

Solution: Add a private utility function that computes these special
  links on the best effort basis.
This commit is contained in:
Evgeni Chasnovski
2026-04-24 12:02:46 +03:00
parent d01dc690e1
commit e45cdbc7c4
5 changed files with 59 additions and 32 deletions

View File

@@ -1248,8 +1248,8 @@ end
---
--- Some features are provided via LSP:
--- - 'textDocument/documentLink' - compute links for plugin paths, sources,
--- commits, and tags. Use |gx| to open a link to an object at cursor.
--- Only supports GitHub hosted repositories for commit and tag links.
--- commits, and tags. Makes a best effort educated guess about a link structure.
--- Use |gx| to open a link to an object at cursor.
--- - 'textDocument/documentSymbol' (`gO` via |lsp-defaults| or |vim.lsp.buf.document_symbol()|) -
--- show structure of the buffer.
--- - 'textDocument/hover' (`K` via |lsp-defaults| or |vim.lsp.buf.hover()|) - show more