fix(pack): suggest "delete" code action for active plugins #39678

Problem: Trying to execute code action on an active plugin without
  updates leads to nothing. It is more useful if code actions "do
  something" on a bigger portion of the confirm buffer.

Solution: Suggest "delete" code action even for active plugins. Trying
  to execute it will first show a confirmation buffer with relevant
  warning of why this might be not a good idea. Confirming will delete
  a plugin.
This commit is contained in:
Evgeni Chasnovski
2026-05-08 15:26:40 +03:00
committed by GitHub
parent b813c7e082
commit 17335308eb
4 changed files with 60 additions and 27 deletions

View File

@@ -1255,8 +1255,8 @@ end
--- - '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 relevant for "plugin at cursor". Like "delete" (if plugin is not active),
--- "update" or "skip updating" (if there are pending updates).
--- code actions relevant for "plugin at cursor". Like "delete" (after extra confirmation for
--- active plugins), "update" or "skip updating" (if there are pending updates).
---
--- @param names? string[] List of plugin names to update. Must be managed
--- by |vim.pack|, not necessarily already added to current session.