Added a step for fetching and building treesitter grammars for helix (#263)
This commit is contained in:
@@ -110,6 +110,7 @@ pub enum Step {
|
|||||||
Julia,
|
Julia,
|
||||||
Juliaup,
|
Juliaup,
|
||||||
Kakoune,
|
Kakoune,
|
||||||
|
Helix,
|
||||||
Krew,
|
Krew,
|
||||||
Macports,
|
Macports,
|
||||||
Mas,
|
Mas,
|
||||||
|
|||||||
@@ -367,6 +367,7 @@ fn run() -> Result<()> {
|
|||||||
runner.execute(Step::Vim, "The Ultimate vimrc", || vim::upgrade_ultimate_vimrc(&ctx))?;
|
runner.execute(Step::Vim, "The Ultimate vimrc", || vim::upgrade_ultimate_vimrc(&ctx))?;
|
||||||
runner.execute(Step::Vim, "voom", || vim::run_voom(&base_dirs, run_type))?;
|
runner.execute(Step::Vim, "voom", || vim::run_voom(&base_dirs, run_type))?;
|
||||||
runner.execute(Step::Kakoune, "Kakoune", || kakoune::upgrade_kak_plug(&ctx))?;
|
runner.execute(Step::Kakoune, "Kakoune", || kakoune::upgrade_kak_plug(&ctx))?;
|
||||||
|
runner.execute(Step::Helix, "helix", || generic::run_helix_grammars(&ctx))?;
|
||||||
runner.execute(Step::Node, "npm", || node::run_npm_upgrade(&ctx))?;
|
runner.execute(Step::Node, "npm", || node::run_npm_upgrade(&ctx))?;
|
||||||
runner.execute(Step::Node, "yarn", || node::run_yarn_upgrade(&ctx))?;
|
runner.execute(Step::Node, "yarn", || node::run_yarn_upgrade(&ctx))?;
|
||||||
runner.execute(Step::Node, "pnpm", || node::run_pnpm_upgrade(&ctx))?;
|
runner.execute(Step::Node, "pnpm", || node::run_pnpm_upgrade(&ctx))?;
|
||||||
|
|||||||
@@ -499,6 +499,26 @@ pub fn run_dotnet_upgrade(ctx: &ExecutionContext) -> Result<()> {
|
|||||||
Ok(())
|
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<()> {
|
pub fn run_raco_update(run_type: RunType) -> Result<()> {
|
||||||
let raco = utils::require("raco")?;
|
let raco = utils::require("raco")?;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user