feat(pack): add code actions in confirmation buffer

Problem: No way to granularly operate on plugins when inside
confirmation buffer.

Solution: Implement code actions for in-process LSP that act on "plugin
at cursor":
  - Update (if has updates).
  - Skip updating (if has updates).
  - Delete.

  Activate via default `gra` or `vim.lsp.buf.code_action()`.
This commit is contained in:
Evgeni Chasnovski
2025-10-05 19:17:52 +03:00
parent 2728b4efe0
commit 98e3a571dd
4 changed files with 262 additions and 27 deletions

View File

@@ -402,6 +402,9 @@ update({names}, {opts}) *vim.pack.update()*
• 'textDocument/hover' (`K` via |lsp-defaults| or
|vim.lsp.buf.hover()|) - show more information at cursor. Like
details of particular pending change or newer tag.
• 'textDocument/codeAction' (`gra` via |lsp-defaults| or
|vim.lsp.buf.code_action()|) - show code actions available for
"plugin at cursor". Like "delete", "update", or "skip updating".
Execute |:write| to confirm update, execute |:quit| to discard the
update.
• If `true`, make updates right away.