Ivan Folgueira Bande 2f6de9187f Squashed 'third-party/nwaku/' content from commit d94cb7c7
git-subtree-dir: third-party/nwaku
git-subtree-split: d94cb7c73631ffd4b934839ba58bc622d331a135
2025-10-02 11:52:12 +02:00

937 B

nph - An opinionated Nim formatter

This prettifier tool is used to format the nwaku code base.

VSCode Extension

https://marketplace.visualstudio.com/items?itemName=arnetheduck.vscode-nph

GitHub

https://github.com/arnetheduck/nph

Make sure you use a binary from the following release: https://github.com/arnetheduck/nph/releases/tag/v0.5.1

$ nph --version
v0.5.1-0-gde5cd48

Installation and configuration

  1. Ask the nwaku team about the required nph version.
  2. Download the desired release from GitHub and place the binary in the PATH env var.
  3. Add the following content into ~/.config/Code/User/settings.json:
{
    "[nim]": {
        "editor.formatOnSave": true,
        "editor.defaultFormatter": "arnetheduck.vscode-nph"
    },
}

With that, every time a Nim file is saved, it will be formatted automatically.