1
0
Fork 0
mirror of https://codeberg.org/tyy/aspm synced 2024-12-22 15:59:29 -07:00
aspm/.vscode/naja.code-snippets
2024-07-11 20:38:57 -06:00

25 lines
No EOL
539 B
Text

{
"Create naja subcommand": {
"scope": "rust",
"prefix": "subcommand",
"body": [
"use clap::Parser;",
"",
"use crate::commands::NajaSubcommand;",
"",
"/// $2",
"#[derive(Parser, Debug)]",
"pub struct $1Command { }",
"",
"#[async_trait::async_trait]",
"impl NajaSubcommand for $1Command {",
"\tasync fn execute(self, state: crate::CliState) -> Result<(), anyhow::Error> {",
"\t\t",
"\t\t",
"\t\tOk(())",
"\t}",
"}",
],
"description": "Create a template for an naja subcommand"
}
}