damlfmt is a VS Code / Daml Studio extension for formatting .daml files. It plugs into the standard Format Document flow and includes conservative smart indentation while typing, with a preview-focused safety-first approach.
Features
Formats DAML files with Format Document (Shift+Option+F on macOS)
Supports daml and daml-core language modes
Sets itself as the default formatter for DAML files via extension defaults
Adds conservative smart indentation while typing (Enter + structural dedent)
Uses safety verification (parse/desugar modes) to avoid applying broken edits
Includes a troubleshooting command: DAML: Show damlfmt Output
Install
Open Extensions in VS Code or Daml Studio.
Search for damlfmt.
Install limechain.damlfmt.
The DAML extension dependency is installed automatically.
Usage
Open a .daml file.
Run Format Document (Shift+Option+F on macOS).
Or open the Command Palette (Cmd+Shift+P) and run Format Document.
If formatting is refused, run DAML: Show damlfmt Output for details.
Preview
This formatter is preview phase quality and undere development. In complex or not fully tested cases it may skip / refuse formatting, and on invalid/in-progress code it behaves conservatively to avoid unsafe edits. Use DAML: Show damlfmt Output when you need details.
License
This project is source-available under the repository LICENSE. Use is permitted, but modification and derivative rights are restricted without prior permission from Limechain.