Skip to content

AneesHl/vscode-lingua-franca

 
 

Repository files navigation

Lingua Franca support for Visual Studio Code

CI

This extension adds language support for Lingua Franca (LF). It is based on the LF Language and Diagram Server and provides:

  • find references
  • folding ranges
  • get workspace symbols
  • hover
  • KlighD-based interactive diagrams (click on diagrams icon: image)
  • syntax highlighting
  • target syntax highlighting
  • code validation upon edit
  • target code validation upon build or file save
  • user-triggered build (Ctrl + Shift + P, then Lingua Franca: Build)
  • user-triggered build and run (Ctrl + Shift + P, then Lingua Franca: Build and Run)

Quick Start

  1. Install this plugin from the VSCode Marketplace/Open VSX Registry (in the command palette Ctrl + P, enter ext install lf-lang.vscode-lingua-franca)
  2. (Skip this step if you already have Lingua Franca projects that you'd like to work on.) Create a new Lingua Franca project by creating a <My Project Name>/src folder and putting a file in it that has the .lf extension.
  3. Open a Lingua Franca project (File > Add Folder to Workspace...). The Explorer (upper left in sidebar) should now show your project files. Open the .lf file you created.
  4. (Optional) Show the diagram for this file by clicking on the diagrams icon at the upper right: image)
  5. Compile the .lf file and run it using (Ctrl + Shift + P, then Lingua Franca: Build and Run).

Requirements

This extension requires Java 17 or up in order to run its embedded Lingua Franca language server. You might need to install additional software to be able to build or execute target code produced by the Lingua Franca compiler. The extension reports missing dependencies upon attempting to build or run.

Settings

Automatic code generation is enabled by default to allow target code to be validated on save. To disable automatic code generation, add the following to .vscode/settings.json:

{
    "linguafranca.generateCodeOnSave": false
}

Contributing

We very much appreciate contributions in the form of code, tests, documentation, bug reports, and feature requests. For more details, see CONTRIBUTING.md.

Join us!

Configuration

Diagrams

To enable diagram-based code navigation, go to Settings > Extensions > KLighD Diagram and deactivate Initial Should Select Diagram and activate Initial Should Select Text instead.

About

Lingua Franca extension for Visual Studio Code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 89.8%
  • Python 10.2%