Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions languages/http/injections.scm
Original file line number Diff line number Diff line change
@@ -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"))
61 changes: 61 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
pkgs ? import <nixpkgs> { },
}:

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"
'';
}