diff options
| author | William Boman <william@redwill.se> | 2023-03-05 03:33:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-05 02:33:41 +0000 |
| commit | 51228a60d1a5017030429ba38f018ff27a460c76 (patch) | |
| tree | aab1aba6059cab2c93e3c6eca76aed5686c91a6a /lua/mason-registry/sources/init.lua | |
| parent | fix(package): emit registry event on abnormal failures (#1061) (diff) | |
| download | mason-51228a60d1a5017030429ba38f018ff27a460c76.tar mason-51228a60d1a5017030429ba38f018ff27a460c76.tar.gz mason-51228a60d1a5017030429ba38f018ff27a460c76.tar.bz2 mason-51228a60d1a5017030429ba38f018ff27a460c76.tar.lz mason-51228a60d1a5017030429ba38f018ff27a460c76.tar.xz mason-51228a60d1a5017030429ba38f018ff27a460c76.tar.zst mason-51228a60d1a5017030429ba38f018ff27a460c76.zip | |
feat(ui): display registries in help window (#1062)
Diffstat (limited to 'lua/mason-registry/sources/init.lua')
| -rw-r--r-- | lua/mason-registry/sources/init.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lua/mason-registry/sources/init.lua b/lua/mason-registry/sources/init.lua index 39b7fad5..e4abe062 100644 --- a/lua/mason-registry/sources/init.lua +++ b/lua/mason-registry/sources/init.lua @@ -36,7 +36,9 @@ function M.set_registries(registry_ids) end end -function M.iter() +---@param opts? { include_uninstalled?: boolean } +function M.iter(opts) + opts = opts or {} local i = 1 return function() while i <= #registries do @@ -47,7 +49,7 @@ function M.iter() registries[i] = registry end i = i + 1 - if registry:is_installed() then + if opts.include_uninstalled or registry:is_installed() then return registry end end |
