A Language Server for WGSL (WebGPU Shading Language)
- Completions:
- Local functions/variables/types.
- Fields and swizzles.
- Builtin types and functions (
dot
,reflect
,textureSample
,vec3
,mat4x2
, etc.)
- Hover Documentation:
- Function signatures.
- Variable types.
- Includes builtin types and functions. Text is taken from the WGSL specification.
- Goto Definition
- Find all References
- Rename
- Formatter
- Support for non-standard
#include
/#import
directives.
First install the language server using cargo
:
cargo install glasgow
Then follow the editor-specific instructions below:
Install the glasgow
extension from the
marketplace.
First, install nvim-lspconfig.
Then it is as simple as enabling the glasgow
configuration:
local lspconfig = require 'lspconfig'
lspconfig.glasgow.setup {}