Last active
December 19, 2018 23:50
-
-
Save leptos-null/fa56e6091d1185e412267df646c1aca4 to your computer and use it in GitHub Desktop.
Protobuf syntax highlighting for nano
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Protobuf syntax highlighting for nano by Leptos | |
## Based off creekpld's Swift syntax highlighter | |
syntax "Protobuf" "\.proto$" | |
# Default | |
color white ".+" | |
# Keywords | |
color yellow "^ *\<(syntax|package|import|option)\>" | |
color magenta "^ *\<(message|enum)\>" | |
color cyan "\<(repeated|optional|required)\>" | |
color magenta "\<(default|packed|deprecated)\>" | |
# Numbers / Decimal Literal | |
color brightblue "\<([0-9]+)\>" | |
# Standard Types | |
color brightmagenta "\<((u|s)?int(32|64))\>" | |
color brightmagenta "\<((s)?fixed(32|64))\>" | |
color brightmagenta "\<(string|float|double|bool|bytes)\>" | |
color brightmagenta "\<(true|false)\>" | |
# Text | |
color red ""[^"]*"" | |
# Comments | |
color green "//.*" | |
color green start="/\*" end="\*/" | |
# Trailing whitespace | |
color ,green "[[:space:]]+$" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment