rego-mode is an Emacs major mode for Rego, the language used by Open Policy Agent.
- syntax highlighting
- Customizable faces for each
- run
opa fmt
on save to format file:(add-hook 'rego-mode-hook #'rego-format-on-save-mode)
- highlight syntax errors in file
- upload file to OPA Playground
- upload data file
- run tests in project
- integrate with Projectile
There are a couple differet ways to install rego-mode. The first is adding rego-mode.el
to a directory in your load-path
:
(add-to-list 'load-path "/your/path/to/rego-mode")
(require 'rego-mode)
(add-to-list 'auto-mode-alist '("\\.rego\\'" . rego-mode))