/vscode-cwscript

VS Code Extension for CWScript language support and other utilities

Primary LanguageTypeScript

CWScript Language Support for VS Code

This extension provides syntax highlighting and code snippets for the CWScript programming language in Visual Studio Code.

banner.png

Features

  • Syntax highlighting for CWScript files (*.cws).
  • Snippets for common CWScript code patterns.
  • Code completion for keywords, constants, and function names.
  • Parameter hints for function calls.
  • Hover information for keywords, constants, and function names.

Installation

  1. Launch Visual Studio Code.
  2. Open the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the VS Code window.
  3. Search for "CWScript" in the Extensions Marketplace.
  4. Click the Install button next to the CWScript extension.
  5. After installation, the extension will be activated automatically.

Usage

Once installed, the extension provides syntax highlighting, code snippets, and other features when editing CWScript files.

Syntax Highlighting

The extension provides syntax highlighting for CWScript files. Keywords, constants, and function names are highlighted with different colors to make them stand out from the rest of the code. Comments are also highlighted with a different color.

Code Snippets

The extension provides code snippets for common CWScript code patterns. To use a code snippet, type the snippet keyword and press Tab. The code snippet will be inserted into the editor.

Code Completion

The extension provides code completion for keywords, constants, and function names. As you type code in the editor, the extension will suggest keywords, constants, and function names that match what you're typing. You can accept a suggestion by pressing Enter.

Parameter Hints

The extension provides parameter hints for function calls. As you type a function call in the editor, the extension will display a tooltip with the function's parameters and their types. This can help you remember the correct order of parameters and their types.

Hover Information

The extension provides hover information for keywords, constants, and function names. If you hover over a keyword, constant, or function name in the editor, the extension will display a tooltip with information about what the keyword, constant, or function does.

Contributing

Contributions to this extension are welcome! To contribute:

  1. Fork the repository.
  2. Make your changes and commit them to your fork.
  3. Submit a pull request.

Credits

This extension is based on the TextMate-compatible syntax definition for CWScript by Martin Ring (https://github.com/martinring/tmlanguage). The code snippets are based on the CWScript documentation (https://developers.cloudflare.com/workers/runtime-apis/cwscript).