From 843b06487c8be91293992090b8171403c8e2a4a9 Mon Sep 17 00:00:00 2001 From: Florian Nagel Date: Sun, 20 Jul 2025 13:44:18 +0200 Subject: [PATCH 1/2] Added nix shell file for nix support --- shell.nix | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 shell.nix diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..1586888 --- /dev/null +++ b/shell.nix @@ -0,0 +1,61 @@ +{ + pkgs ? import { }, +}: + +pkgs.mkShell { + buildInputs = with pkgs; [ + # Rust toolchain + rustup + + # Development tools + git + curl + wget + jq + + # Build dependencies + pkg-config + openssl + openssl.dev + + # System libraries that might be needed + gcc + glibc + + # Optional but useful tools + bacon # Background rust code checker + cargo-watch # Auto-rebuild on file changes + cargo-edit # Cargo subcommands for editing Cargo.toml + cargo-outdated # Check for outdated dependencies + + # For HTTP/networking projects + netcat + nmap + wireshark-cli + + nil + nixfmt-rfc-style + ]; + + # Environment variables + RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; + PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig"; + OPENSSL_DIR = "${pkgs.openssl.dev}"; + OPENSSL_LIB_DIR = "${pkgs.openssl.out}/lib"; + OPENSSL_INCLUDE_DIR = "${pkgs.openssl.dev}/include"; + + shellHook = '' + echo "🦀 Rust development environment loaded!" + echo "Rust version: $(rustc --version)" + echo "Cargo version: $(cargo --version)" + echo "" + echo "Available tools:" + echo " - rust-analyzer (LSP server)" + echo " - clippy (linter)" + echo " - rustfmt (formatter)" + echo " - bacon (background checker)" + echo " - cargo-watch (file watcher)" + echo "" + echo "Run 'cargo --help' to see available commands" + ''; +} From 77bc1e28ef4151dbfd59cb30974d596bc51dab80 Mon Sep 17 00:00:00 2001 From: Florian Nagel Date: Sun, 20 Jul 2025 17:26:28 +0200 Subject: [PATCH 2/2] Added language injections to request bodies --- languages/http/injections.scm | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 languages/http/injections.scm diff --git a/languages/http/injections.scm b/languages/http/injections.scm new file mode 100644 index 0000000..45f20c9 --- /dev/null +++ b/languages/http/injections.scm @@ -0,0 +1,8 @@ +((json_body) @injection.content + (#set! injection.language "json")) + +((xml_body) @injection.content + (#set! injection.language "xml")) + +((graphql_body) @injection.content + (#set! injection.language "graphql"))