VScode stuff

This commit is contained in:
MCorange 2024-03-14 10:04:30 +02:00
parent acc3380bcd
commit 2624d8107b
6 changed files with 24 additions and 1 deletions

3
.gitignore vendored
View File

@ -1,6 +1,7 @@
/target
/* /*
!/.vscode
!/.gitignore !/.gitignore
!/.gitkeep
!/src !/src
!/include !/include
!/Cargo* !/Cargo*

11
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,11 @@
{
"recommendations": [
"aaron-bond.better-comments",
"usernamehw.errorlens",
"tamasfe.even-better-toml",
"platformio.platformio-ide",
"1YiB.rust-bundle",
"tamasfe.even-better-toml",
"ms-vscode.cpptools"
]
}

5
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,5 @@
{
"files.associations": {
"*.s": "platformio-debug.asm"
}
}

1
Cargo.lock generated
View File

@ -146,6 +146,7 @@ dependencies = [
"bitflags", "bitflags",
"camino", "camino",
"clap", "clap",
"clap_derive",
"lazy_static", "lazy_static",
"map-macro", "map-macro",
"parse_int", "parse_int",

View File

@ -10,6 +10,7 @@ anyhow = "1.0.80"
bitflags = "2.4.2" bitflags = "2.4.2"
camino = "1.1.6" camino = "1.1.6"
clap = { version = "4.5.2", features = ["derive"] } clap = { version = "4.5.2", features = ["derive"] }
clap_derive = "4.5.0"
lazy_static = "1.4.0" lazy_static = "1.4.0"
map-macro = "0.3.0" map-macro = "0.3.0"
parse_int = "0.6.0" parse_int = "0.6.0"

View File

@ -1,5 +1,6 @@
use clap::{builder::PossibleValue, Parser, ValueEnum}; use clap::{builder::PossibleValue, Parser, ValueEnum};
use camino::Utf8PathBuf; use camino::Utf8PathBuf;
lazy_static::lazy_static! { lazy_static::lazy_static! {
static ref DEFAULT_INCLUDE_PATHS: Vec<Utf8PathBuf> = vec![ static ref DEFAULT_INCLUDE_PATHS: Vec<Utf8PathBuf> = vec![
Utf8PathBuf::from("./"), Utf8PathBuf::from("./"),
@ -40,12 +41,15 @@ pub struct CliArgs {
pub target: CompilationTarget, pub target: CompilationTarget,
/// Input code files /// Input code files
#[arg(required=true, num_args=1..)]
pub input: Vec<Utf8PathBuf>, pub input: Vec<Utf8PathBuf>,
#[clap(skip)] #[clap(skip)]
pub passthrough: Vec<String> pub passthrough: Vec<String>
} }
impl CliArgs { impl CliArgs {
pub fn parse_with_passthrough() -> Self { pub fn parse_with_passthrough() -> Self {
let mut clap_args = Vec::new(); let mut clap_args = Vec::new();