Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>ASI for GLSLNew to Visual Studio Code? Get it now.
ASI for GLSL

ASI for GLSL

DrDesten

|
2,643 installs
| (1) | Free
Adds Automatic Semicolon Insertion to GLSL
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Automatic Semicolon Insertion for GLSL

ASI for GLSL is an extension that aims to catch and fix syntax errors automatically.

Feature: Automatic Semicolon Insertion

Automatically adds semicolons to GLSL shader programs.
The AST Parser is more robust than the RegEx based approach. Legacy RegEx is deprecated but will stay available until all features have been moved to the AST Parser.

Extra Features: AST Parser

Automatic Parentheses

Automatically adds missing parentheses to if, switch, for, while and do-while statements.

Automatic Colons

Automatically adds missing colons in switch statements.

Automatic Explicit Type Conversions

Automatically adds explicit type conversions in variable declarations when the initializer is not implicitly convertible to the declared type.

Extra Features: Legacy RegEx

Automatic Argument Parentheses

Automatically adds parentheses around the arguments of if and for statements.
|Shorthand|Expanded| |-|-| |if x ...|if (x) ...| |for a;b;c { ... }|for (a;b;c) { ... }|

Lazy for

Shorter for syntax for indexes starting at zero.
|Shorthand|Expanded| |-|-| |for (5) { ... }|for (int i = 0; i < 5; i++) { ... }| |for (o < 5) { ... }|for (int o = 0; o < 5; o++) { ... }| |for (float o < 5) { ... }|for (float o = 0; o < 5; o++) { ... }|

Lazy Constructors

Infer constructors for vector and matrix types on initialization
|Shorthand|Expanded| |-|-| |vecn var = 0|vecn var = vecn(0)| |matn var = 0|matn var = matn(0)| |matnxm var = 0|matnxm var = matnxm(0)|

Usage

ASI for GLSL is a formatter. It will run when you execute the 'Format Document' command. You can set formatting to occur on save, and all changes will be applied every time you save the file.
Changes will not happen while you type.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft