Skip to content

Instantly share code, notes, and snippets.

@sraboy
Created March 13, 2019 13:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sraboy/967d228bdc523cb82fb254cdd0bc5a00 to your computer and use it in GitHub Desktop.
Save sraboy/967d228bdc523cb82fb254cdd0bc5a00 to your computer and use it in GitHub Desktop.
Geany Protobuf Syntax Highlighting
# Proto3 syntax highlighting. Build menu has `Python` option for `protoc`
# Based on Geany's built in CPP definition.
# Add to ~/.config/geany/filedefs
# In `filetype_extension.conf` add "Proto=*.proto" in the `Extensions` list and "Proto" to the `Misc` list in `Groups`
# For complete documentation of this file, please see Geany's main documentation
[styling=C]
[keywords]
# all items must be in one line
primary=double float int32 int64 uint32 uint64 sint32 sint64 fixed32 fixed64 sfixed32 sfixed64 bool string bytes map
secondary=true false reserved repeated import public oneof optional option message enum syntax package Any service returns optimize_for SPEED CODE_SIZE LITE_RUNTIME deprecated
[lexer_properties=C]
[settings]
lexer_filetype=C
# default extension used when saving files
extension=proto
# MIME type
mime_type=application/x-protobuf
# the following characters are these which a "word" can contains, see documentation
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
# single comments, like # in this file
comment_single=//
# multiline comments
comment_open=/*
comment_close=*/
# set to false if a comment character/string should start at column 0 of a line, true uses any
# indentation of the line, e.g. setting to true causes the following on pressing CTRL+d
#command_example();
# setting to false would generate this
# command_example();
# This setting works only for single line comments
comment_use_indent=true
# context action command (please see Geany's main documentation for details)
context_action_cmd=
[indentation]
#width=4
# 0 is spaces, 1 is tabs, 2 is tab & spaces
#type=1
[build-menu]
# %f will be replaced by the complete filename
# %e will be replaced by the filename without extension
# (use only one of it at one time)
FT_00_LB=_Compile (Python)
FT_00_CM=protoc --python_out=. "%f"
FT_00_WD=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment