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