Enable clangd support for HLSL
The goal of this project is to enable support for the High-Level Shading Language (HLSL) in clangd, allowing shader developers to benefit from modern language-server features such as code completion, diagnostics, semantic highlighting, and symbol navigation. Although HLSL is largely based on the C++11 standard and can already be parsed by Clang, clangd’s support remains incomplete due to missing handling of HLSL-specific constructs, semantics, and resource types. Additionally, shader development introduces unique challenges, such as multiple entry points within a single file (e.g., vertex and pixel shaders), which are not fully addressed by clangd’s current architecture. The project will begin with an evaluation of clangd’s behavior on HLSL code to identify gaps, followed by the design of appropriate extensions. An RFC will be proposed to the LLVM community to validate the design and gather feedback. Based on this, the project will implement key improvements to clangd, focusing on built-in function completion, semantic analysis of shader constructs, improved diagnostics, and better handling of shader-specific configurations. The final deliverables include a documented analysis of current limitations, an RFC describing the proposed design, a structured set of implementation issues, and upstreamed improvements to clangd, along with test coverage and documentation.
Project details
Technologies
Not listed in the archive