Skip to content

Add HLSL language server support (shader-language-server)#1093

Open
TheSmallKiwi wants to merge 4 commits intooraios:mainfrom
TheSmallKiwi:feature/hlsl-language-server
Open

Add HLSL language server support (shader-language-server)#1093
TheSmallKiwi wants to merge 4 commits intooraios:mainfrom
TheSmallKiwi:feature/hlsl-language-server

Conversation

@TheSmallKiwi
Copy link

Summary

  • Add HLSL language server integration using shader-language-server from antaalt/shader-sense
  • Supports .hlsl, .hlsli, .fx, .fxh, .cginc, .compute, .shader file extensions
  • Auto-downloads pre-built binaries from GitHub releases (Windows x64/ARM64, Linux x64), with fallback to system PATH
  • Harden request_full_symbol_tree() to catch SolidLSPException per-file so a single LS crash doesn't abort the entire workspace scan

What's included

  • HlslLanguageServer class with dependency provider, initialize params, and Unity-specific directory ignore list
  • Language.HLSL enum entry with file matchers and factory method
  • 12 tests covering: symbol discovery, go-to-definition (cross-file), hover, and full symbol tree indexing
  • Test repo with 4 HLSL files across root and subdirectory, exercising includes, structs, functions, cbuffers, and compute kernels
  • Fix is_ignored_dirname to call super() so dot-directories (.git, .serena, etc.) are properly excluded

Test plan

  • uv run poe test -m hlsl — all 12 tests pass
  • uv run poe format — clean
  • uv run poe type-check — clean

🤖 Generated with Claude Code

TheSmallKiwi and others added 4 commits February 24, 2026 17:17
…a file

When request_full_symbol_tree processes all project files, a language server
crash on a single file (e.g. complex HLSL shaders) would propagate up and
abort the entire search. Now catches SolidLSPException per-file, logs a
warning, and auto-restarts the LS if it terminated so remaining files
can still be processed.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Fix is_ignored_dirname to call super() so dot-directories are properly
excluded during workspace walks.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
shader-language-server only publishes binaries for Windows and Linux.
Add availability check and skipif decorators following the existing
pattern (erlang, clojure, cpp).

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant