Plugin request: WGSL / shader-language LSP support
Gap
The official Claude Code plugin marketplace (claude-plugins-official) ships LSP plugins for: clangd, csharp, gopls, jdtls, kotlin, lua, php, pyright, ruby, rust-analyzer, swift, typescript. There is no plugin for WGSL or any other shader language (GLSL, HLSL, MSL, Slang).
This is increasingly relevant because:
- The
wgpuecosystem (used bybevy,wgpu-rsapps, and any Rust project targeting cross-API GPU work) has standardized on WGSL as the source authoring language. nagais the canonical WGSL parser/validator/translator in the Rust ecosystem.- Shader files often live alongside Rust code in mixed Rust + WGSL projects; the existing
rust-analyzer-lspplugin handles.rsbut leaves.wgslas plain text from Claude's perspective.
Existing tools that could be wrapped
wgsl-analyzer— a community LSP (https://github.com/wgsl-analyzer/wgsl-analyzer). Less actively maintained but pre-existing.nagavalidator (cargo install naga-cli) — canonical WGSL conformance check used by the wgpu ecosystem. Doesn't ship as an LSP today but the parser surface is mature and structured.
Why this matters in practice
Cross-platform-deterministic shader work needs:
- Symbol navigation (jump-to-def for shader functions, struct fields, uniform bindings).
- Shader-aware rename / find-references (especially across
#import-style modules). - Inline diagnostics (binding mismatches, undeclared identifiers, type errors) without rebuilding the whole crate.
Without LSP integration, Claude Code falls back to Read + Grep for shader work, which scales poorly past a few thousand lines of WGSL.
Wrinkle for any future plugin
Many real-world WGSL projects (Bevy, custom engines) layer naga_oil preprocessor directives on top of plain WGSL — #import titan::frame_uniforms as Frame, #define_import_path titan::brdf, #ifdef SKINNED. Plain naga's parser rejects these. Any LSP plugin would ideally either:
- Accept
naga_oil-preprocessed output, OR - Run
naga_oil::compose::Composeras a pre-pass and validate the composed output, OR - Be tolerant of the directive syntax at the surface.
Suggestion
Add a wgsl-lsp (or naga-lsp) plugin to the official marketplace, mirroring the existing LSP plugin shape (README + LICENSE + harness recognition). Even minimum-viable WGSL parse-and-symbol coverage would be a meaningful uplift for shader-heavy Rust projects.
---
Filing this from a real AAA Rust game engine project (Titan) that has 19 WGSL files across one renderer crate, with active shader work in Phase 4 m11-m13 (baked lighting, RT, post-processing) on the roadmap.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗