/cooma-vscode

Visual Studio Code extension for the Cooma language.

Primary LanguageTypeScriptMozilla Public License 2.0MPL-2.0

Cooma Language Support

Language extension for the Cooma language.

Anthony M. Sloane (inkytonik)

Prerequisites

You'll need the Cooma development source code and to use the sbt assembly command to make an all-in-one jar. The all-in-one jar should be created at target/scala-2.13/cooma.jar in your Cooma working directory.

Setup

Before the server will run properly you'll need to configure the following settings:

  • cooma.java: path to Java runtime

  • cooma.jar: path to the Cooma "all-in-one" jar

The other Cooma settings can be adjusted as desired to get the extension to show you information derived from a Cooma program that you are editing. Possibilities include the source tree representation of the program and the intermediate representation code. See the Cooma settings documentation for details.

Features

The extension provides rudimentary syntax highlighting for Cooma files and Cooma IR files.

In addition, the Cooma language server starts automatically when you open a .cooma file. If you want to restart with a new version of Cooma, use the 'Cooma: Restart server' command.

The language server supports:

  • Problems display of messages from the Cooma compiler.

  • Hover help when moving the cursor over identifier definitions and uses.

  • Definition and reference navigation and display.

  • Monto-based structured text products from the Cooma implementation. E.g., you can ask to see the Source Tree of a Cooma program that you are editing, the intermediate representation (IR) of the code generated by the Cooma compiler, or a trace of the IR interpretation. Look in the Cooma settings for the available product choices.

  • Linking from many structure text products to the relevant part of the associated Cooma file, and vice versa. E.g., if you are showing the Cooma Source Tree display, clicking on a node should focus the relevant source code. Use the "Cooma: Select Linked Editors" command to go in the other direction.