Skip to content
Switch branches/tags
This branch is 58 commits ahead, 2 commits behind tikhomirov:master.

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


This plugin adds OpenGL Shading Language (GLSL) syntax highlighting support to Vim. It supports everything in the standard GLSL 4.6 plus a few common KHR/EXT extensions. Among other things, it supports the GL_KHR_vulkan_glsl extension for Vulkan. It also highlights #include directives, which are widely used (even if they're technically non-standard). It fixes a few issues with tikhomirov's repository, such as the missing subroutine and component keywords that should be available in GLSL (even if they're "rare").

If you find anything important missing, feel free to open an issue or (even better) create a PR. Please be aware that no vendor extensions will be accepted into this repository. If they're EXT or KHR extensions though, they are more than welcome! Please see the public GLSL extensions repo.

It applies syntax highlighting to the following glslang file extensions: .glsl, .vert, .tesc, .tese, .geom, .frag, .comp, .rayg, .rayi, .raya, .rayh, .raym, .rayc (from GL_EXT_ray_tracing). .mesh will also be supported once/if we get a KHR/EXT extension for mesh shading.


  • OpenGL Shading Language: all versions from 1.10 to 4.60
    • Added missing component layout qualifier
    • Added missing subroutine from GLSL 4.6
  • OpenGL ES Shading Language: versions 1.00 and 3.00
  • The Vulkan GLSL extensions found in GL_KHR_vulkan_glsl:
    • shaderc-style #include directives
    • constant_id and push_constant layout qualifiers
    • gl_VertexIndex and gl_InstanceIndex
    • Ability to specify descriptor sets with set qualifier
    • Support for the various subpassInput descriptors
    • Ability to speicfy input_attachment_index in layout
    • The subpassLoad built-in function for Vulkan
    • Both the imageBuffer and textureBuffer descriptors
    • And finally sampler and samplerShadow
  • The following official KHR/EXT extensions are supported:
    • GL_KHR_memory_scope_semantics
    • GL_KHR_shader_subgroup
    • GL_KHR_vulkan_glsl
    • GLSL_EXT_fragment_invocation_density
    • GLSL_EXT_fragment_shading_rate
    • GLSL_EXT_ray_flags_primitive_culling
    • GLSL_EXT_ray_query
    • GLSL_EXT_ray_tracing
    • GLSL_EXT_shader_image_int64
    • GL_EXT_control_flow_attributes
    • GL_EXT_device_group
    • GL_EXT_multiview
    • GL_EXT_nonuniform_qualifier
    • GL_EXT_scalar_block_layout
    • GL_EXT_shader_16bit_storage
    • GL_EXT_shader_explicit_arithmetic_types
    • GL_EXT_shader_realtime_clock
    • GL_EXT_subgroupuniform_qualifier
  • texture2D is highlighted as a type instead of a function


Using Vundle

Add this to your vimrc:

Plugin 'CaffeineViking/vim-glsl'

Then reload your vimrc and run :PluginInstall.

Using Pathogen

$ cd ~/.vim/bundle
$ git clone

Then run :Helptags to generate help tags.


GLSL Syntax Highlighting for Vim with Vulkan, raytracing, subgroups + more!