Back to browse
GitHub Repository

https://www.npmjs.com/package/css-variable-lsp

0 starsTypeScript

CSS Variables LSP for VS Code and Zed (Rust-First, TS Fallback)

by lmn451·Mar 2, 2026·2 points·0 comments

AI Analysis

●●SolidNiche GemShip It

LSP for CSS variables with cascade awareness, but Stylelint, PostCSS, and editor extensions already cover this.

Strengths
  • Dual Rust/TypeScript impl with npm fallback is clever shipping strategy; no forcing browser dependency
  • Cascade-aware hover (specificity + source order) is genuinely useful for complex design systems
  • Workspace indexing across .css, .scss, .sass, .less, HTML, Vue, Svelte, Astro is thorough
Weaknesses
  • CSS variables are niche within frontend; VSCode already has basic CSS var completion built-in
  • No documented performance benchmarks on large codebases; Rust rewrite's ROI vs TS unclear without data
Target Audience

Frontend developers using CSS variables, design systems teams

Similar To

Stylelint · PostCSS plugins · VSCode IntelliSense (built-in)

Post Description

I built a CSS custom-properties language server and shipped it across VS Code and Zed.

It started as a TypeScript server (`css-variable-lsp`) and now also has a Rust implementation (`css-lsp-rust`).

What works today: 1. Context-aware completion inside `var(...)` (CSS/HTML/JS string contexts). 2. Cascade-aware hover (`!important`, specificity, source order). 3. Workspace-wide definition, references, rename, diagnostics. 4. Color previews/resolution through variable chains. 5. Rust-first distribution with safe fallback to TS/npm when needed.

Repos: TS LSP: https://github.com/lmn451/css-lsp Rust LSP: https://github.com/lmn451/css-lsp-rust VS Code extension: https://github.com/lmn451/css-variables-vscode Zed extension: https://github.com/lmn451/css-variables-zed

Similar Projects

AI/MLPass

Binary is no longer safe

Uses differential-property testing as an automated feedback loop to validate LLM-driven rewrites — that's the clever bit that turns flaky translations into repeatable refinement. The author targets a closed-source MUD DLL to avoid model memorization and walks through why raw assembly prompts failed and how decompiled C+tests + LLM translation to Rust succeeds. It's a thoughtful, slightly alarming demo with concrete techniques you can try yourself, not just vaporware.

WizardryBig BrainNiche Gem
seddonm1
303mo ago

Themeable HN

CSS variable extraction for HN theming when dark reader extensions already exist.

Cozy
insin
811mo ago