From d01dc690e1e86911f65fcbe0b733aca613a4dcd0 Mon Sep 17 00:00:00 2001 From: Evgeni Chasnovski Date: Thu, 23 Apr 2026 19:50:02 +0300 Subject: feat(pack): support `textDocument/documentLink` in confirmation buffer Problem: In `vim.pack.update()` confirmation buffer it might be useful to be able to use `gx` (open link at cursor) when cursor is on something like commit or tag. Solution: Add `textDocument/documentLink` method support for the in-process LSP. This may be used by LSP clients and makes `gx` automatically work. The shortcoming is that this requires tracking how to construct a URL from source and commit/tag. Currently only GitHub hosted repositories are supported. --- runtime/lua/vim/pack.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'runtime/lua/vim/pack.lua') diff --git a/runtime/lua/vim/pack.lua b/runtime/lua/vim/pack.lua index ae965c68df..c6dec53d32 100644 --- a/runtime/lua/vim/pack.lua +++ b/runtime/lua/vim/pack.lua @@ -1247,6 +1247,9 @@ end --- - |]]| and |[[| to navigate through plugin sections. --- --- 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. --- - '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 -- cgit