Skip to content

davidpomerenke/while-syntax-vscode

 
 

Repository files navigation

WHILE Syntax Highlighting for VS Code

VS Code Marketplace Installs Rating

A VS Code syntax highlighter for the extended WHILE language, as used in the Limits of Computation module at the University of Sussex.

Uses the same colours as the Sublime plugin, by which it was inspired.

Consists of two parts:

  • A syntax in the TextMate/JSON format. This enables existing themes, such as the default themes, to make sense of the language.

  • Two custom themes for the WHILE language grammar. They are much cooler than the colours from the default themes, but they only support highlighting of .while files. Theme by Language is a nice and simple extension which solves this problem and selects the theme according to the current file extension. Otherwise you will need to switch the theme manually whenever you are working with WHILE.

Preview

Preview of dark and light theme.

Installation

  1. Select the Extensions button in the sidebar.

Screenshot.

  1. Search for while-syntax and install the extension.

Screenshot.

  1. Select the Settings button in the lower sidebar.

Screenshot.

  1. Select the While Unlimited Light or While Unlimited Dark theme in the list.

Screenshot.

Contributing

All kinds of contributions are very welcome! :)

Development

Debugging

Clone this repository, open it in VS Code, and press F5 to open a new VS Code window where all your changes are applied. Colour changes are live-updated automatically, and with Ctrl Shift F5 you can reload the debugging window to apply grammar changes.

Press F1 and search for Developer: Inspect Editor Tokens and Scope to see how the grammar tokenizes each word.

Debugging screenshot.

Resources

Releases

No releases published

Packages

No packages published