This is a Visual Studio Code extension that provides syntax highlighting, code folding, and basic editor support for the CyrusLang programming language.
- Syntax highlighting for keywords, variables, types, strings, numbers, and comments.
- Code folding using
#region
and#endregion
. - Automatic indentation and bracket matching.
- Auto-closing and surrounding pairs for
{}
,[]
,()
,"
and'
. - Single-line (
//
) and multi-line (/* */
) comments.
Follow these steps to install and use the extension:
git clone <repository-url>
cd cyruslang-vscode-extension
code .
Install the vsce
tool if you don't already have it:
npm install -g @vscode/vsce
Run the following command to create a .vsix
file:
vsce package
- Open Visual Studio Code.
- Go to the Extensions view (
Ctrl+Shift+X
). - Click on the
...
menu in the top right corner and select Install from VSIX. - Select the generated
.vsix
file from the previous step.
- Open a file with the
.cy
extension. - Enjoy syntax highlighting and editor support for CyrusLang!
- Keywords:
if
,else
,for
,match
,fn
,struct
, etc. - Types:
i32
,f64
,string
,bool
,range
, etc. - Variables: Variables prefixed with
#
. - Constants:
true
,false
,nil
. - Strings: Single and double-quoted strings, with escape sequences.
- Single-line:
// This is a comment
- Multi-line:
/* * This is a * multi-line comment */
Use the following markers for custom folding:
// #region
// Code here...
// #endregion
{}
,[]
,()
,"
,'
.
Automatic indentation for blocks like:
fn example() {
if (condition) {
// Indented block
}
}
This extension is designed for files with the .cy
extension.
Contributions are welcome! To contribute:
- Fork the repository.
- Create a feature branch.
- Submit a pull request with a detailed description.
This project is licensed under the MIT License. See the LICENSE file for details.
If you encounter any issues or have suggestions, feel free to open an issue in the repository.
Happy coding in CyrusLang!