For correct syntax highlighting in Ubuntu’s default text editor (gedit) for anyone editing Grammatical Framework source code, put the code below into the file
~/.local/share/gtksourceview-2.0/language-specs/gf.lang (under Ubuntu).
Some helpful notes/links:
- The code is based heavily on the
haskell.langfile which I found in
- Ruslan Osmanov recommends registering your file extension as its own MIME type (see also here), however on my system the
.gfextension was already registered as a generic font (
application/x-tex-gf) and I didn’t want to risk messing any of that up.
- This is a quick 5-minute job and might require some tweaking. The GtkSourceView language definition tutorial is the place to start looking.
- Contributions are welcome!