Added a step for fetching and building treesitter grammars for helix (#263)

This commit is contained in:
sandal
2022-12-14 09:12:39 +01:00
committed by GitHub
parent 1e14b3bf28
commit 9f424f03c3
3 changed files with 22 additions and 0 deletions

View File

@@ -499,6 +499,26 @@ pub fn run_dotnet_upgrade(ctx: &ExecutionContext) -> Result<()> {
Ok(())
}
pub fn run_helix_grammars(ctx: &ExecutionContext) -> Result<()> {
utils::require("helix")?;
print_separator("Helix");
ctx.run_type()
.execute(ctx.sudo().as_ref().ok_or(TopgradeError::SudoRequired)?)
.args(["helix", "--grammar", "fetch"])
.status_checked()
.with_context(|| "Failed to download helix grammars!")?;
ctx.run_type()
.execute(ctx.sudo().as_ref().ok_or(TopgradeError::SudoRequired)?)
.args(["helix", "--grammar", "build"])
.status_checked()
.with_context(|| "Failed to build helix grammars!")?;
Ok(())
}
pub fn run_raco_update(run_type: RunType) -> Result<()> {
let raco = utils::require("raco")?;