feat(pack): hint in confirmation buffer that plugin is not active

Problem: After `vim.pack.update()` it is not clear if plugin is active
  or not. This can be useful to detect cases when plugin was removed
  from 'init.lua' but there was no `vim.pack.del()`.

Solution: Add ` (not active)` suffix with distinctive highlighting to
  header of plugins that are not active.
  It will also be shown in in-process LSP document symbols to have quick
  reference about which plugins are not active.
This commit is contained in:
Evgeni Chasnovski
2025-12-28 18:07:32 +02:00
parent f5707a9c42
commit c339b83a4a
4 changed files with 31 additions and 5 deletions

View File

@@ -59,7 +59,7 @@ local get_plug_data_at_lnum = function(bufnr, lnum)
if not (from <= lnum and lnum <= to) then
return {}
end
return { group = group, name = name, from = from, to = to }
return { group = group, name = name:gsub(' %(not active%)$', ''), from = from, to = to }
end
--- @alias vim.pack.lsp.Position { line: integer, character: integer }