https://github.com/mattmahn/rego-mode
An Emacs major mode for Rego
https://github.com/mattmahn/rego-mode
emacs emacs-mode emacs-plugin major-mode
Last synced: about 1 year ago
JSON representation
An Emacs major mode for Rego
- Host: GitHub
- URL: https://github.com/mattmahn/rego-mode
- Owner: mattmahn
- License: bsd-3-clause
- Created: 2020-08-10T04:09:32.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-19T04:22:14.000Z (almost 6 years ago)
- Last Synced: 2025-06-30T20:05:36.855Z (about 1 year ago)
- Topics: emacs, emacs-mode, emacs-plugin, major-mode
- Language: Emacs Lisp
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
rego-mode is an Emacs major mode for [Rego](https://www.openpolicyagent.org/docs/latest/policy-language/), the language used by [Open Policy Agent](https://openpolicyagent.org/).
# Features
- [x] syntax highlighting
- [x] Customizable faces for each
- [x] 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](https://play.openpolicyagent.org/)
- [ ] upload data file
- [ ] run tests in project
- [ ] integrate with [Projectile](https://docs.projectile.mx/projectile/index.html)
# 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`:
```emacs-lisp
(add-to-list 'load-path "/your/path/to/rego-mode")
(require 'rego-mode)
(add-to-list 'auto-mode-alist '("\\.rego\\'" . rego-mode))
```