1
Fork 0
Language server for GLSL (autocomplete, goto-definition, formatter, and more)
Find a file
2025-06-05 00:42:54 +02:00
.github/workflows use vars in releases 2023-10-29 18:21:59 +01:00
resources Add some documentation to README 2023-09-30 16:10:47 +02:00
spec add gl_Position to spec.json 2023-12-06 21:04:53 +01:00
src Change indentation amount from 4 to 2 2025-06-05 00:42:54 +02:00
tests parser tests: check exit code as a failure condition 2023-11-01 22:03:43 +06:00
.gitignore update to zig 0.13.0 2024-07-31 09:46:49 +02:00
.gitmodules replace glsl samples with glsl-samples submodule 2023-10-15 19:54:20 +06:00
build.zig fix(zig-0.14): makeFn signature 2025-03-19 17:50:59 -07:00
justfile allow files with only preprocessor directives 2023-12-06 20:50:46 +01:00
LICENSE.md Add some documentation to README 2023-09-30 16:10:47 +02:00
README.md README: document supported Zig version 2025-03-20 08:18:21 +01:00
release.sh enable parallel release builds 2023-10-17 08:47:39 +02:00

glsl_analyzer

Language server for GLSL (OpenGL Shading Language).

Features

  • 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

Screenshots

Completion

completion

Formatting

formatting

Goto-Definition

goto definition

In the pipeline

  • Support for refactors (renaming)

Installation

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).

Building from Source

zig build install -Doptimize=ReleaseSafe --prefix ~/.local/

Tested using zig 0.14.0.

Usage

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>

Neovim

nvim-lspconfig comes with support for glsl_analyzer. Simply add the following to your lua config:

require'lspconfig'.glsl_analyzer.setup{}

Visual Studio Code

Install the glsl-analyzer extension from the marketplace. It will automatically download the latest precompiled binary for your platform.