1
0
Fork 0
mirror of https://codeberg.org/tyy/aspm synced 2024-12-22 20:39:29 -07:00
aspm/.vscode/naja.code-snippets

25 lines
539 B
Text
Raw Normal View History

2024-07-11 20:38:57 -06:00
{
"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"
}
}