Skip to content

svenstaro/glsl-language-server

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

glsl-language-server

Language server implementation for GLSL

Status

Currently this LSP implementation can be interfaced with using either HTTP or stdio.

Current Features

  • Diagnostics

Planned Features

  • Completion
  • Hover
  • Jump to def
  • Workspace symbols
  • Find references

Compile

git submodule update --init
cmake -Bbuild -GNinja
ninja -Cbuild

You can also use the Makefile in the project root which is provided for convenience.

Install

ninja -Cbuild install

Usage

You can run glslls to use a HTTP server to handle IO. Alternatively, run glslls --stdin to handle IO on stdin.

Editor Examples

The following are examples of how to run glslls from various editors that support LSP.

Emacs

Add the following to your init.el, or other config file. This assumes you have glsl-mode installed. See the lsp-mode docs for more details.

(with-eval-after-load 'lsp-mode
  (add-to-list 'lsp-language-id-configuration
               '(glsl-mode . "glsl"))
  (lsp-register-client
   (make-lsp-client :new-connection (lsp-stdio-connection '("glslls" "--stdin"))
                    :activation-fn (lsp-activate-on "glsl")
                    :server-id 'glslls)))