/rego-mode

An Emacs major mode for Rego

Primary LanguageEmacs LispBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

rego-mode is an Emacs major mode for Rego, the language used by Open Policy Agent.

Features

  • 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

Installation

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))