Skip to content

Moonsong-Labs/daml-canton-jetbrains

Repository files navigation

DAML JetBrains Plugin

DAML and Canton tooling for JetBrains IDEs. The plugin wraps the official DAML language server (daml damlc ide / dpm damlc ide) through the IntelliJ Platform native LSP API and adds Script Results, run configurations, Canton file support, and managed local Canton sandbox tools.

Status

v local-install beta. The repository builds a JetBrains plugin ZIP suitable for Settings / Preferences -> Plugins -> Gear -> Install Plugin from Disk.... Marketplace publishing is intentionally not wired into CI yet.

The repository and Gradle artifact are named daml-canton-jetbrains; the JetBrains plugin ID remains com.moonsonglabs.canton-jetbrains-plugin to preserve upgrade continuity.

Features

  • Syntax highlighting for .daml files via a native lexer.
  • Diagnostics, hover, go-to-definition, completion, document symbols, and rename through the official DAML LSP.
  • Local fallback navigation for DAML imports and explicit import-list symbols.
  • Script Results explorer with Overview, Contracts, Tx Tree, Disclosure, Console, and Raw views.
  • daml.yaml and multi-package.yaml JSON-schema completion.
  • DAML run configurations for build, test, script, and start.
  • Canton config/script highlighting and run configurations for .conf, .canton, and .canton.sc.
  • Managed Canton Sandboxes tool window for local multi-participant profiles, topology diagrams, endpoint consoles, and ledger activity exploration.
  • Live templates for common DAML declarations and expressions.
  • Per-project runtime settings for DAML SDK, DPM, Canton, logging, telemetry, extra args, and multi-package mode.

Requirements

  • Any JetBrains IDE 2026.1 or newer.
  • JDK 21 for building the plugin.
  • dpm or the DAML assistant installed locally. The plugin can install DAML SDK 3.4.11 from settings.
  • Canton installed locally if you want Canton run configurations or managed sandbox workflows.

Build

./gradlew --no-daemon --no-configuration-cache test
./gradlew --no-daemon --no-configuration-cache verifyPluginProjectConfiguration verifyPluginStructure
./gradlew --no-daemon --no-configuration-cache buildPlugin

The plugin ZIP is written to:

build/distributions/daml-canton-jetbrains-<version>.zip

Generated build outputs are intentionally ignored. Releases should attach the ZIP generated by CI.

Install Locally

  1. Build the plugin ZIP.
  2. Open Settings / Preferences -> Plugins in a compatible JetBrains IDE.
  3. Click the gear icon and choose Install Plugin from Disk....
  4. Select build/distributions/daml-canton-jetbrains-<version>.zip.
  5. Restart the IDE if prompted.
  6. Open a DAML/Canton project folder.
  7. Open Settings -> Languages & Frameworks -> DAML and validate or install the local runtime.

Expected smoke-test signals:

  • The IDE LSP widget shows the DAML Language Server as running.
  • .daml files show highlighting, diagnostics, hover, and navigation.
  • A DAML script exposes Script Results and opens the DAML Script Results tool window.
  • The Managed Canton Sandboxes tool window opens from the right tool-window stripe.
  • DAML and Canton run configurations execute and show output in the Run tool window.

CI

The repository includes GitHub Actions for the normal JetBrains plugin lifecycle:

  • .github/workflows/build.yml: CI for pull requests and pushes to main; runs tests, fast IntelliJ plugin configuration/structure verification, and buildPlugin.
  • .github/workflows/build-release.yml: the only release-build workflow; runs on v*.*.* tags, builds the release ZIP, and creates a draft GitHub Release with the ZIP attached.
  • .github/dependabot.yml: keeps Gradle and GitHub Actions dependencies fresh.

Full binary compatibility verification is available through ./gradlew verifyPlugin, but it is not required in pull-request CI yet. Run it manually before Marketplace publication when the target IDE matrix is intentionally updated.

License

Apache License 2.0. Includes assets and behavior ported from digital-asset/daml, also Apache 2.0.

About

DAML plugin for Jetbrains IDE

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors