1---
2title: Rego
3description: "Configure Rego language support in Zed, including language servers, formatting, and debugging."
4---
5
6# Rego
7
8Rego language support in Zed is provided by the community-maintained [Rego extension](https://github.com/StyraInc/zed-rego).
9
10- Tree-sitter: [FallenAngel97/tree-sitter-rego](https://github.com/FallenAngel97/tree-sitter-rego)
11- Language Server: [open-policy-agent/regal](https://github.com/open-policy-agent/regal)
12
13## Installation
14
15The extension is largely based on the [Regal](https://docs.styra.com/regal/language-server) language server which should be installed to make use of the extension. Read the [getting started](https://docs.styra.com/regal#getting-started) instructions for more information.
16
17## Configuration
18
19The 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:
20
21```yaml
22rules:
23 style:
24 todo-comment:
25 # don't report on todo comments
26 level: ignore
27 line-length:
28 # custom rule configuration
29 max-line-length: 100
30 # warn on too long lines, but don't fail
31 level: warning
32 opa-fmt:
33 # not needed as error is the default, but
34 # being explicit won't hurt
35 level: error
36 # files can be ignored for any individual rule
37 # in this example, test files are ignored
38 ignore:
39 files:
40 - "*_test.rego"
41```
42
43Read Regal's [configuration documentation](https://docs.styra.com/regal#configuration) for more information.