| Crates.io | css-variable-lsp |
| lib.rs | css-variable-lsp |
| version | 0.1.9 |
| created_at | 2026-01-07 17:44:08.119591+00 |
| updated_at | 2026-01-24 12:43:08.320826+00 |
| description | A fast, Rust-based Language Server Protocol implementation for CSS Variables |
| homepage | https://github.com/lmn451/css-lsp-rust |
| repository | https://github.com/lmn451/css-lsp-rust |
| max_upload_size | |
| id | 2028746 |
| size | 273,203 |
A Language Server Protocol implementation for CSS Variables, written in Rust.
This is a ground-up Rust rewrite of the TypeScript/Node-based css-variable-lsp, eliminating the Node/npm dependency for the Zed extension.
var() usage tracking<style> blocks and inline styles (custom DOM scanner)cargo build --release
Build and package release assets into dist/ (tar.gz on Unix, zip on Windows):
./scripts/build-release-assets.sh
To build a subset of targets:
./scripts/build-release-assets.sh x86_64-apple-darwin aarch64-apple-darwin
cargo run --release
The LSP server communicates via stdin/stdout using the Language Server Protocol.
main.rs - Entry point, sets up async runtime and LSP serverlsp_server.rs - LSP protocol handlers (implements tower_lsp::LanguageServer)manager.rs - CSS variable manager (stores definitions/usages, DOM trees)types.rs - Core data types (CssVariable, CssVariableUsage, Config, etc.)parsers/ - CSS and HTML parsing (definitions + var() usages)dom_tree.rs - Lightweight HTML scanner for selector matchingspecificity.rs - Specificity calculation and cascade orderingworkspace.rs - Workspace scanning and file discoveryruntime_config.rs - CLI/env configuration parsingpath_display.rs - Path formatting for hover/completioncolor.rs - Color parsing and color provider helperstower-lsp - LSP server frameworktokio - Async runtimeglobset / walkdir - Workspace scanningcsscolorparser - Color value parsingregex / pathdiff - Parsing helpers and path formattingGPL-3.0