Difference between revisions of "Syntax Highlighting (in VS-Code) for Z^3 Language"
| (One intermediate revision by the same user not shown) | |||
| Line 23: | Line 23: | ||
=== 3. Launch Extension Development Host === | === 3. Launch Extension Development Host === | ||
Once the project is open in VS Code: | Once the project is open in VS Code: | ||
| + | Navigate to the file under syntaxes. This where the code for the actual highlighting is. From here | ||
Press '''F5''' or go to '''Run''' → '''Start Debugging''' | Press '''F5''' or go to '''Run''' → '''Start Debugging''' | ||
This will open a new VS Code window titled '''Extension Development Host''' | This will open a new VS Code window titled '''Extension Development Host''' | ||
| Line 32: | Line 33: | ||
=== 4. Test the Syntax Highlighting === | === 4. Test the Syntax Highlighting === | ||
In the Extension Development Host window: | In the Extension Development Host window: | ||
| − | Create a new file with a ZCubes extension: | + | Create a new file (it does not matter where you create this new file) with a ZCubes extension: |
#* <code>.z3</code> files | #* <code>.z3</code> files | ||
#* <code>.zc</code> files | #* <code>.zc</code> files | ||
Latest revision as of 19:53, 12 June 2025
ZCubes Syntax Highlighting for VS Code
This guide will help you install and use the ZCubes syntax highlighting extension in VS Code. You will run it locally using VS Code's Extension Development Host.
Prerequisites
Visual Studio Code (latest version recommended) Git (for cloning the repository)
Installation Steps
1. Clone the Repository
First, clone the ZCubes syntax highlighting extension repository to your local machine:
git clone https://github.com/Vishwa18K/z3.git.
cd zcubes-syntax-highlighting
As shown in the screenshot, Be sure to be exact with filename and git links.
2. Open in VS Code
Open the extension project in VS Code or alternatively, you can: Open VS Code Go to File → Open Folder Select the cloned extension directory. Regardless, Open the entire folder (or root folder in other words) on vscode. If done correctly, you should see exactly 7 files and 2 folders.
3. Launch Extension Development Host
Once the project is open in VS Code: Navigate to the file under syntaxes. This where the code for the actual highlighting is. From here Press F5 or go to Run → Start Debugging This will open a new VS Code window titled Extension Development Host The extension is now active in this development window. (If this does not work click the play button with the 'bug' on it and under the drop down menu at the top and make sure it says 'Run extension debugger'. If it's not there then you have to manually add the extension debugger. A guide on how to do that can be found here
4. Test the Syntax Highlighting
In the Extension Development Host window: Create a new file (it does not matter where you create this new file) with a ZCubes extension:
.z3files.zcfiles
Start typing ZCubes code to see the syntax highlighting in action Example ZCubes code to test:
PRINT "Hello, ZCubes!"
x = MAGICSQUARE(3)
result = SUM(x)
<script>
// JavaScript code should be highlighted here
console.log("Embedded JavaScript");
</script>