Download the DMG file. Open it and drag the app to /Applications
.
Put a .nitguard
file next to your workspace or project file, or in any root
parent directory. It can look something like this:
{
"command": "tools/swiftformat",
"args": [ "--config", ".swiftformat" ]
}
Or this:
{
"command": "tools/clang-format",
"args": [ "--assume-filename, "${CTX:documentName}" ]
}
A secondary feature of NitGuard is to deliver contextual data to your format commands. This
data can be accessed using the format: ${CTX:[DATA]}
where [DATA]
is
one of the provided items. The list of provided items is:
documentName
: The name of the document being formatted.