https://github.com/zeioth/mason-extra-cmds
Provides the command :MasonUpdateAll
https://github.com/zeioth/mason-extra-cmds
neovim-plugin neovim-plugins nvim-plugin nvim-plugins
Last synced: about 1 year ago
JSON representation
Provides the command :MasonUpdateAll
- Host: GitHub
- URL: https://github.com/zeioth/mason-extra-cmds
- Owner: Zeioth
- License: gpl-3.0
- Created: 2024-03-10T18:15:46.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-28T23:05:04.000Z (about 1 year ago)
- Last Synced: 2025-03-18T13:29:06.141Z (about 1 year ago)
- Topics: neovim-plugin, neovim-plugins, nvim-plugin, nvim-plugins
- Language: Lua
- Homepage:
- Size: 70.3 KB
- Stars: 19
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MasonExtraCmds
This plugins adds the command `:MasonUpdateAll`.

## What it does
It allows you to update all mason packages through a Neovim command, so you don't need to open mason. This is cool for key mappings, autocmds and stuff.
## How to use
On lazy
```lua
{
"williamboman/mason.nvim",
dependencies = { "Zeioth/mason-extra-cmds", opts = {} },
cmd = {
"Mason",
"MasonInstall",
"MasonUninstall",
"MasonUninstallAll",
"MasonLog",
"MasonUpdate",
"MasonUpdateAll", -- this cmd is provided by mason-extra-cmds
},
},
```
## Events
* **Can I run lazy automatically after `MasonUpdateAll`?** Yes.
```lua
--- EXAMPLE: Run lazy after `:MasonUpdateAll` finishes updating.
vim.api.nvim_create_autocmd("User", {
pattern = "MasonUpdateAllCompleted",
callback = function()
vim.cmd(":Lazy update")
end,
})
```
* **Can I run `:MasonUpdateAll` automatically after a lazy update?** Yes.
```lua
--- EXAMPLE: Run mason after lazy finishes updating.
vim.api.nvim_create_autocmd("User", {
pattern = "LazyInstall",
callback = function()
vim.cmd(":MasonUpdateAll")
end,
})
```
Through the same mechanism you could also do `:TSUpdate` to update `treesitter`, for example.
## Tested versions
* Neovim: `0.10`/`0.11`
* Mason: `v1.x.x`