Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>DWScriptNew to Visual Studio Code? Get it now.
DWScript

DWScript

Christian-W. Budde

|
1 install
| (0) | Free
DWScript language support using Tree-sitter
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

DWScript for VS Code

Version VS Code

DWScript language support for Visual Studio Code, powered by Tree-sitter for accurate and fast syntax highlighting.

Features

  • Syntax Highlighting: Rich highlighting for DWScript files (.dws, .pas) using Tree-sitter parsing.
  • Semantic Tokens: Enhanced code understanding with semantic token support for keywords, types, functions, and more.
  • Incremental Parsing: Efficient updates on document changes for smooth editing experience.

Requirements

  • Visual Studio Code ^1.92.0
  • Node.js (for development)

Installation

From Marketplace

  1. Open VS Code.
  2. Go to Extensions (Ctrl+Shift+X).
  3. Search for "DWScript" and install.

From Source

  1. Clone this repository.
  2. Run npm install.
  3. Run npm run build.
  4. Run npm run package to create a .vsix file.
  5. Install the .vsix in VS Code via Extensions > Install from VSIX.

Usage

  1. Open a .dws or .pas file in VS Code.
  2. The extension activates automatically and provides syntax highlighting.

How It Works

  • Parser Loading: Loads the DWScript Tree-sitter grammar from @cwbudde/tree-sitter-dwscript.
  • Query Execution: Applies queries/highlights.scm to extract syntax captures from the AST.
  • Token Mapping: Maps Tree-sitter captures (e.g., @keyword) to VS Code semantic token types for highlighting.

Development

Prerequisites

  • Node.js
  • npm

Setup

npm install

Build

npm run build  # Bundles to out/extension.js

Watch Mode

npm run watch  # Rebuilds on changes

Package

npm run package  # Creates .vsix file

Testing

Manually verify highlighting by opening .dws or .pas files and checking syntax colors.

Contributing

Contributions are welcome! Please open issues or submit pull requests on GitHub.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Powered by Tree-sitter and @cwbudde/tree-sitter-dwscript.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft