Skip to content

jimhourihan/glsl-mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GLSL Major Mode

This is a major mode for Emacs providing editing conveniences for the OpenGL Shading Language (GLSL). It currently handles GLSL version 4.6, including many recent Vulkan extensions.

In brief, it provides the following features:

  • Syntax high-lighting for symbols and built-in functions and variables.

  • Indentation for the current line (TAB) and selected region (C-M-</kbd>).

  • Fast switching between 'file.vert' and 'file.frag' with ff-find-other-file (S-iso-lefttab).

  • Interactive function glsl-find-man-page prompts for a GLSL built-in functions which it formats to an opengl.org URL and finally passes that to browse-url.

  • An initial tree-sitter implementation.

Installation

The easiest way to install glsl-mode via MELPA, which can be setup with the following snippet:

(require 'package)
(add-to-list 'package-archives
             '("melpa" . "http://melpa.org/packages/"))
(package-initialize)

Once that is done, then just refresh the packages and install it with:

  • M-x package-refresh-contents
  • M-x package-install glsl-mode

Alternatively, you can also install the package using e.g. use-package with the following snippet in your .emacs:

(use-package glsl-mode
    :ensure t)

Attributions and References

This major mode was originally authored by [email protected] and extended by Jim Hourihan.

Original GLSL mode website: (https://maverick.inria.fr/~Xavier.Decoret/resources/glsl-mode/index.html)

See GLSL 4.6 Spec (PDF) the official reference document for GLSL 4.6.

About

GLSL emacs mode

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published