mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-06-28 11:24:14 +00:00
hide _
key of plugins
This commit is contained in:
parent
3ba3240240
commit
9304c37515
1 changed files with 8 additions and 2 deletions
|
@ -341,6 +341,12 @@ function Spec:report(level)
|
||||||
return count
|
return count
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local remove_internal_keys = function(item, path)
|
||||||
|
if path[#path] == "_" then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
return item
|
||||||
|
end
|
||||||
---@param spec LazySpec|LazySpecImport
|
---@param spec LazySpec|LazySpecImport
|
||||||
---@param results? string[]
|
---@param results? string[]
|
||||||
function Spec:normalize(spec, results)
|
function Spec:normalize(spec, results)
|
||||||
|
@ -371,8 +377,8 @@ function Spec:normalize(spec, results)
|
||||||
spec["WARNING:"] = "-- Ignored keys below! --"
|
spec["WARNING:"] = "-- Ignored keys below! --"
|
||||||
self:warn(
|
self:warn(
|
||||||
"This list of specs has extraneous keys - "
|
"This list of specs has extraneous keys - "
|
||||||
.. "these will not be processed by lazy.nvim as they do not belong to any plugins:\n"
|
.. "they do not belong to any plugins, so they are currently unused by lazy.nvim:\n"
|
||||||
.. vim.inspect(spec, { depth = 2, process = processor })
|
.. vim.inspect(spec, { depth = 2, process = remove_internal_keys })
|
||||||
.. "\n"
|
.. "\n"
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue