GLSL language server support
Check for existing issues
- [X] Completed
Language
GLSL
Tree Sitter parser link
https://github.com/theHamsta/tree-sitter-glsl
Language server link
https://github.com/svenstaro/glsl-language-server
Misc notes
Common file suffixes are listed in the reference parser readme (there are quite a few). In addition to those, .glsl is frequently used for GLSL files that contain shared code to be included in other files.
I’m sure I’m not the only one who was wondering what the state of this is, so:
- Syntax highlighting seems to already be supported, but there’s no autocomplete of any kind.
- The syntax works for
.vert/.fragetc. files, but not for.glslfiles. For those you need to manually change the language every time you open the file. - You can use
clang-formatfor formatting GLSL on save by adding the below to Zed settings:
"language_overrides": {
"GLSL": {
"formatter": {
"external": {
"command": "node_modules/.bin/clang-format”, // or where ever you’ve installed it
"arguments": []
}
}
}
}
Just to note, the GLSL code currently resides in the Zed repo, but it will be removed as a built-in language and will be published to the extension store soon. Right now, it has tree-sitter support - all that is left is for someone to add the code to bring in the language server.