This extension provides syntax highlighting for the Zero programming language.
- Syntax highlighting for .z files
- Code completion for keywords, types, and standard library functions
- Basic language configuration (comments, brackets, etc.)
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Click on the three dots (...) in the top right corner
- Select "Install from VSIX..."
- Navigate to the
zero-language-extensiondirectory and select the extension file
- Open the
zero-language-extensiondirectory in VS Code - Press F5 to launch the extension in a new VS Code window
To build the extension into a VSIX file, follow these steps:
-
Install the VS Code Extension Manager (vsce):
npm install -g vsce
-
Navigate to the extension directory:
cd zero-language-extension -
Install dependencies:
npm install
-
Build the extension:
npm run build
This will compile the TypeScript code and generate a .vsix file in the extension directory that you can install in VS Code.
The extension will automatically detect .z files and provide:
- Syntax highlighting for all language elements
- Code completion for:
- Keywords:
func,var,return,if,else,while,include,typedef,new,null - Types:
Int,Bool,string,object - Standard library functions:
print,swap,__print
- Keywords:
Based on the Zero language syntax, the extension highlights:
- Keywords:
func,var,return,if,else,while,include,typedef,new,null - Types:
Int,Bool,string,object - Strings: Double-quoted strings
- Numbers: Integer and floating-point numbers
- Booleans:
true,false - Operators: Arithmetic, assignment, comparison, logical
- Punctuation: Semicolons, commas, brackets, etc.
- Functions: Function definitions
- Types: Type definitions
- Variables: Variable names
- Code completion
- Go to definition
- Find references
- Syntax error checking
- Debugging support