Visitar URL original
Zig Plugin - dprint - Code Formatter
// plugins

Zig

zig fmt (Zig) wrapper plugin.

Wrapper plugin that formats Zig code via zig fmt. It runs the formatter from Zig's standard library compiled to Wasm, so it formats exactly like zig fmt.

Formats .zig and .zon files.

Install and Setup

In your project's directory with a dprint.json file, run:

dprint add zig

This will update your config file to have an entry for the plugin.

{
  "plugins": [
    "npm:@dprint/zig@0.1.2"
  ]
}

Configuration

There's nothing to configure, since zig fmt has no formatting options. The global configuration doesn't apply either, so files are always indented with four spaces and have LF newlines, like with zig fmt.

All plugins

Official Plugins

Community Plugins

Wrapper Plugins

Everything Else