Open jansol opened 1 year ago
I’m sure I’m not the only one who was wondering what the state of this is, so:
.vert/.frag
etc. files, but not for .glsl
files. For those you need to manually change the language every time you open the file.clang-format
for 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.
Check for existing issues
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.