nolanderc / glsl_analyzer

Language server for GLSL (autocomplete, goto-definition, formatter, and more)
GNU General Public License v3.0
156 stars 3 forks source link

glsl_analyzer

Language server for GLSL (OpenGL Shading Language).

Features

Screenshots

Completion

completion

Formatting

formatting

Goto-Definition

goto definition

In the pipeline

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.12.0-dev.629+1606717b5.

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.