Skip to content

GrammaticalFramework/gf-emacs-mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 

Repository files navigation

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).

About

A major mode for editing GF code.

Resources

Stars

Watchers

Forks

Packages

No packages published