GDShader LSP
English | 简体中文
Language support for Godot 4 .gdshader files in Visual Studio Code.
Features
- Godot shader syntax highlighting and editor snippets.
- Completions for shader keywords, built-ins, types, functions, and variables.
- Syntax and semantic diagnostics while you type.
- Hover information and go-to-definition support.
- Document symbols and semantic highlighting.
- Color detection and color presentations for shader color values.
- Uniform parsing and safe default-value editing through the extension API used by GDShader Render.
Installation
Install the extension from a VSIX file:
- Open the Extensions view in Visual Studio Code.
- Select Views and More Actions... > Install from VSIX....
- Choose
gdshader-lsp-support-1.0.0.vsix.
- Open a file with the
.gdshader extension.
No Godot installation is required for language features. Godot is only required by the separate GDShader Render extension.
Supported Language Features
The server supports the Godot shader language used by canvas_item, spatial, particles, sky, and fog shaders. It recognizes common declarations such as uniforms, varyings, constants, functions, structs, includes, render modes, and built-in shader symbols.
shader_type canvas_item;
uniform float strength : hint_range(0.0, 1.0) = 0.5;
uniform vec3 tint : source_color = vec3(1.0);
void fragment() {
COLOR = vec4(tint * strength, 1.0);
}
Settings
GDShader LSP currently has no extension-specific settings. Features are enabled automatically for .gdshader files. Settings that did not alter runtime behavior were intentionally removed to keep the extension configuration accurate.
Standard Visual Studio Code language settings such as formatting, editor behavior, file associations, and semantic highlighting remain available through the usual editor configuration.
Compatibility
- Visual Studio Code 1.85 or later.
- Godot 4 shader syntax.
Known Limitations
- Diagnostics are implemented independently of the Godot compiler and may not cover every engine-version-specific rule.
- Include resolution and cross-file definitions are limited compared with importing a full Godot project model.
- The extension does not compile or render shaders. Use GDShader Render for live previews.
License
Released under the MIT License.
Repository: Suzuran28/gdshader-lsp-vsix