Language server for GLSL (OpenGL Shading Language).
- Completion
- User-defined variables/functions.
- Built-in types (e.g.,
vecN
,matNxM
,texture2D
, etc.) - Built-in functions (e.g.,
length
,imageLoad
,packUnorm4x8
) - Includes all extensions
- Fields
- Goto Definition
- Inline hover documentation for all builtin and extension functions/variables
- Support for
#include
- Formatter
- Support for refactors (renaming)
We provide precompiled binaries for Linux, MacOS and Windows on the
Releases page.
Make sure to copy it somewhere under your PATH
environment variable (e.g.
~/.local/bin
on Linux).
zig build install -Doptimize=ReleaseSafe --prefix ~/.local/
Tested using zig 0.13.0
.
By default glsl_analyzer
communicates over stdin/stdout:
glsl_analyzer
However, you can configure it to use a specific port (TCP) using the following command:
glsl_analyzer --port <PORT>
nvim-lspconfig
comes with support for glsl_analyzer
. Simply add the following to your lua config:
require'lspconfig'.glsl_analyzer.setup{}
Install the
glsl-analyzer
extension from the marketplace. It will automatically download the latest precompiled binary for your platform.