Skip to content

tsandall/vim-rego

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

vim-rego

A Vim plugin for the Rego language that includes support for syntax highlighting.

Formatting

You can configure Vim to automatically format your Rego policies using opa fmt. Install the vim-autoformat plugin then put this in your .vimrc:

let g:formatdef_rego = '"opa fmt"'
let g:formatters_rego = ['rego']
let g:autoformat_autoindent = 0
let g:autoformat_retab = 0
au BufWritePre *.rego Autoformat

If you want to see parse errors that occurred during formatting put this in your .vimrc as well:

let g:autoformat_verbosemode = 1

About

Vim plugin for Rego: www.openpolicyagent.org

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published