Rejig - a DAML import formatter

Hi daml devs,

Just wanted to share a tool I created that sorts and formats a module header (import / exports). Its called rejig GitHub - mjstewart/rejig: A module header (imports / exports) formatting tool for haskell and daml and I also created a vscode extension for it too. Hopefully the README explains how it works and install steps.

I totally get that formatting is a personal taste in style, I created this for my own personal haskell and DAML projects based on my own preferences and works a fair bit differently to other formatting styles seen in the wild.

Thought it may be of interest to anyone using DAML if they’re shopping around for options :smiley:


That’s amazing @matt! A first step towards a proper DAML auto-formatter, a much asked-for feature for the IDE. Did you write your own parser, or are you hooking into the DAML parser itself?

1 Like

For my own use case to use within haskell and daml projects, I decided to write my own parser for fun and learning.

I hope it might provide some inspiration for any future work in this area and provides another option that would work alongside any other formatters that might get created.


@matt Would you be OK if we linked this on I’m creating a page of “Samples”, which includes a section on add-on tooling and integration libraries.

1 Like

@bernhard yeah sure go ahead, that’s fine with me :slight_smile:

1 Like