u/Meri_Marzi

▲ 2 r/neovim

How do you manage Mason-installed LSPs and tools with Chezmoi?

I'm moving my development environment to Chezmoi so I can manage all my dotfiles, packages, and system configuration in one place.

As part of my setup, Chezmoi installs Neovim and syncs all of my plugins. One thing I'm still unsure about is how people manage language servers, formatters, debuggers, and linters that are installed through Mason.

My current idea is to add a `run_after_99_mason_install.sh` script under `.chezmoiscripts` that runs after Neovim and its plugins are installed. The script would install all required Mason packages using something like:

nvim --headless -c "MasonInstall <package>" -c "qall"

for each package I need.

Is this the recommended approach, or is there a better pattern for managing Mason-installed tools with Chezmoi? I'm interested in how others keep this reproducible across fresh machines.

reddit.com
u/Meri_Marzi — 7 hours ago

How do you manage Mason-installed LSPs and tools with Chezmoi?

I'm moving my development environment to Chezmoi so I can manage all my dotfiles, packages, and system configuration in one place.

As part of my setup, Chezmoi installs Neovim and syncs all of my plugins. One thing I'm still unsure about is how people manage language servers, formatters, debuggers, and linters that are installed through Mason.

My current idea is to add a `run_after_99_mason_install.sh` script under `.chezmoiscripts` that runs after Neovim and its plugins are installed. The script would install all required Mason packages using something like:

nvim --headless -c "MasonInstall <package>" -c "qall"

for each package I need.

Is this the recommended approach, or is there a better pattern for managing Mason-installed tools with Chezmoi? I'm interested in how others keep this reproducible across fresh machines.

reddit.com
u/Meri_Marzi — 18 hours ago