Added extension for mason (#1113)

* feat: added extension for mason

* feat: update readme

* feat: capitalize the first letter

* feat: delete icon

---------

Co-authored-by: Shadman <13149513+shadmansaleh@users.noreply.github.com>
This commit is contained in:
暮晨 2023-10-17 17:51:54 +08:00 committed by GitHub
parent e7efd7dd3a
commit 388a396411
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 0 deletions

View File

@ -912,6 +912,7 @@ extensions = {'quickfix'}
- symbols-outline
- toggleterm
- trouble
- mason
#### Custom extensions

View File

@ -0,0 +1,25 @@
-- lualine extension for mason.nvim
local ok, mason_registry = pcall(require, 'mason-registry')
if not ok then
return ''
end
local M = {}
M.sections = {
lualine_a = {
function()
return 'Mason'
end,
},
lualine_b = {
function()
return 'Installed: ' .. #mason_registry.get_installed_packages() .. '/' .. #mason_registry.get_all_package_specs()
end,
},
}
M.filetypes = { 'mason' }
return M