Skip to content

mattmahn/rego-mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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