mirror of
https://github.com/neovim/neovim.git
synced 2026-03-02 07:08:27 +00:00
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:
@@ -25,8 +25,10 @@ for i, l in ipairs(lines) do
|
||||
cur_header_hl_group = header_hl_groups[cur_group]
|
||||
hi_range(i, 0, l:len(), cur_header_hl_group)
|
||||
elseif l:find('^## (.+)$') ~= nil then
|
||||
-- Header 2
|
||||
-- Header 2 with possibly "(not active)" suffix
|
||||
hi_range(i, 0, l:len(), cur_header_hl_group)
|
||||
local col = l:match('() %(not active%)$') or l:len()
|
||||
hi_range(i, col, l:len(), 'DiagnosticError', priority + 1)
|
||||
elseif cur_info ~= nil then
|
||||
-- Plugin info
|
||||
local end_col = l:match('(). +%b()$') or l:len()
|
||||
|
||||
Reference in New Issue
Block a user