A major mode for editing GF code.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README
gf.el

README

GF emacs mode

http://melpa.org/packages/gf-badge.svg

A major mode for editing GF code.

default key bindings

key bindingdescription
C-c C-lload file on GF shell (haskell runtime by default)
C-c C-bdisplay GF shell buffer
C-c C-srun GF shell
C-c C-.show oper or lin’s type signature, if available (only useful for small grammars)

features

  • syntax highlighting
  • indentation support
  • integrated GF shell
  • display oper type declaration in minibuffer

to-do

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.

installation

MELPA

  1. set MELPA up, if you haven’t already.
  2. M-x package-refresh-contents
  3. M-x package-install RET gf

manual installation

  1. install the dependencies:
    M-x package-install s
    M-x package-install ht
        
  2. 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
        
  3. add to your .emacs file:
    (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))
        

customization

to customize gf-mode, load the library and do M-x customize-group RET gf.

contributing

contributions are welcome!

credits

Johan Bockgård wrote most of the mode back in the 2000s (see first commit).