GF emacs mode
A major mode for editing GF code.
default key bindings
|load file on GF shell (haskell runtime by default)|
|display GF shell buffer|
|run GF shell|
|show oper or lin’s type signature, if available (only useful for small grammars)|
- syntax highlighting
- indentation support
- integrated GF shell
opertype declaration in minibuffer
if you’d like to have a feature implemented, you should file at ticket at the issue tracker. our current to-do list is there too.
- set MELPA up, if you haven’t already.
M-x package-install RET gf
- install the dependencies:
M-x package-install s M-x package-install ht
- clone the repo and put these files where emacs will load them, as in:
$ cd ~/some/path/ $ git clone https://github.com/GrammaticalFramework/gf-emacs-mode
- add to your
(add-to-list 'load-path "~/some/path/gf-emacs-mode/") (autoload 'gf-mode "gf" "Major mode for editing GF files." t) (add-to-list 'auto-mode-alist '("\\.gf\\(\\|e\\|r\\|cm?\\)\\'" . gf-mode)) (add-to-list 'auto-mode-alist '("\\.cf\\'" . gf-mode)) (add-to-list 'auto-mode-alist '("\\.ebnf\\'" . gf-mode))
gf-mode, load the library and do
contributions are welcome!
Johan Bockgård wrote most of the mode back in the 2000s (see first commit).