{"library":"prettier-plugin-glsl","title":"Prettier Plugin for GLSL","description":"A Prettier plugin for formatting GLSL (OpenGL Shading Language) files. Version 0.2.5 is the latest stable release, built on Chevrotain parser with no external parsing dependencies. It supports Prettier 3.x and includes TypeScript type definitions. Key differentiators: automatic detection of common GLSL extensions, formatting of #define macros as top-level declarations, markdown formatting for /** comments, and high compatibility with Shadertoy shaders (95%+). Active development with potential breaking changes in any version.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install prettier-plugin-glsl"],"cli":{"name":"prettier","version":null}},"imports":["import plugin from 'prettier-plugin-glsl'","import { parsers } from 'prettier-plugin-glsl'; const glslParser = parsers['glsl-parser'];","import { printers } from 'prettier-plugin-glsl'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// Install prettier and plugin\n// npm install --save-dev prettier prettier-plugin-glsl\n\n// .prettierrc\n{\n  \"plugins\": [\"prettier-plugin-glsl\"],\n  \"overrides\": [\n    {\n      \"files\": [\"*.frag\", \"*.vert\", \"*.glsl\"],\n      \"options\": {\n        \"parser\": \"glsl-parser\"\n      }\n    }\n  ]\n}\n\n// Format all GLSL files in project\n// npx prettier --write \"**/*.{glsl,frag,vert}\"\n\n// Example input.vs\n#version 330 core\nlayout(location = 0) in vec3 aPos;\nvoid main()\n{\ngl_Position = vec4(aPos, 1.0);\n}\n\n// After formatting: npx prettier --write input.vs\n// Output:\n#version 330 core\nlayout(location = 0) in vec3 aPos;\n\nvoid main() {\n  gl_Position = vec4(aPos, 1.0);\n}\n","lang":"typescript","description":"Installation, configuration, and basic formatting of a GLSL vertex shader file.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}