Skip to content

RubixDev/mason-update-all

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mason-update-all

Easily update all Mason packages with one command.

Table of Contents

Requirements

Installation

use { 'RubixDev/mason-update-all' }
Plug 'RubixDev/mason-update-all'

Setup

require('mason-update-all').setup()

Commands

  • :MasonUpdateAll — update all installed Mason packages

Events

Upon completion of all updates the user event MasonUpdateAllComplete will be emitted. You can use it like so:

vim.api.nvim_create_autocmd('User', {
    pattern = 'MasonUpdateAllComplete',
    callback = function()
        print('mason-update-all has finished')
    end,
})

or in VimScript:

autocmd User MasonUpdateAllComplete echo 'mason-update-all has finished'

Updating from CLI

Using the provided vim command and user event, it is possible to update the Mason packages from the command line or shell scripts.

# Update Packer plugins
nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync'

# Update Mason packages
nvim --headless -c 'autocmd User MasonUpdateAllComplete quitall' -c 'MasonUpdateAll'

About

Easily update all Mason packages with one command

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages