Skip to content

Type to search extensions

Rego

v0.0.2

Zed extension for the Rego policy language

Updated 2 years ago
56k downloads Repository ↗

Rego

Rego language support in Zed is provided by the community-maintained Rego extension.

Installation

The extension uses the Regal language server. If regal is on your PATH, Zed uses it; otherwise the extension downloads it automatically. Read the getting started instructions for more information.

Configuration

The extension's behavior is configured in the .regal/config.yaml file. The following is an example configuration which disables the todo-comment rule, customizes the line-length rule, and ignores test files for the opa-fmt rule:

rules:
  style:
    todo-comment:
      # don't report on todo comments
      level: ignore
    line-length:
      # custom rule configuration
      max-line-length: 100
      # warn on too long lines, but don't fail
      level: warning
    opa-fmt:
      # not needed as error is the default, but
      # being explicit won't hurt
      level: error
      # files can be ignored for any individual rule
      # in this example, test files are ignored
      ignore:
        files:
          - "*_test.rego"

Read Regal's configuration documentation for more information.

ZedExt An unofficial community project. Not affiliated with Zed Industries.

Data from Zed’s extension registry and GitHub · updated