lean2/src/emacs
2014-08-21 10:05:14 -07:00
..
CMakeLists.txt feat(emacs): include lean-mode Emacs files in the distribution 2014-01-09 11:50:07 -08:00
lean-cmd.el feat(emacs): implement lean-show-type 2014-08-13 17:02:49 -07:00
lean-debug.el feat(emacs): implement lean-show-type 2014-08-13 17:02:49 -07:00
lean-flycheck.el fix(emacs/lean-flycheck): fix eval-after-load to use library name 2014-08-15 09:07:50 -07:00
lean-info.el fix(emacs/lean-info): temporary fix for NAY problem 2014-08-21 10:05:14 -07:00
lean-input.el feat(library/hott): add basic HoTT definitions and theorems 2014-07-15 21:46:33 +01:00
lean-mode.el fix(emacs/lean-mode): add missing flycheck-init 2014-08-21 10:05:14 -07:00
lean-server.el fix(emacs): roll back to generic mode 2014-08-21 10:05:14 -07:00
lean-settings.el feat(emacs): add company mode (via etags) 2014-08-19 15:03:51 -07:00
lean-syntax.el feat(emacs/lean): add multi-line comments 2014-08-19 15:03:51 -07:00
lean-tags.el feat(emacs): add lean-complete-tag (tab) 2014-08-15 21:30:47 -07:00
lean-type.el refactor(emacs/lean-type): clean up 2014-08-18 13:34:13 -07:00
lean-util.el fix(emacs/lean-util): add missing 'cl-' prefix 2014-08-17 18:09:01 -07:00
lean-variable.el feat(emacs): implement lean-show-type 2014-08-13 17:02:49 -07:00
README.md feat(emacs): add lean-complete-tag (tab) 2014-08-15 21:30:47 -07:00

lean-mode

Emacs mode for lean theorem prover

Requirement

lean-mode requires Emacs 24 and following (optional) packages which can be installed via M-x package-install.

To install them, you need to have MELPA in your package-archives. You can add it by evaluating the following elisp code:

(add-to-list 'package-archives
             '("marmalade" . "http://marmalade-repo.org/packages/") t)

Setup

Put the following elisp code on your emacs setup:

(setq lean-rootdir "~/projects/lean")
(setq-local lean-emacs-path
            (concat (file-name-as-directory lean-rootdir)
                    (file-name-as-directory "src")
                    "emacs"))
(add-to-list 'load-path (expand-file-name lean-emacs-path))
(require 'lean-mode)

;; lean customization
(customize-set-variable 'lean-show-rule-column-method 'vline)
(customize-set-variable 'lean-rule-column 100)
(customize-set-variable 'lean-rule-color "#ff0000")
(customize-set-variable 'lean-delete-trailing-whitespace t)

Key Bindings

Key Function
C-c C-x lean-std-exe
C-c C-l lean-std-exe
C-c C-k lean-hott-exe
C-c C-t lean-eldoc-documentation-function
C-c C-f lean-fill-placeholder
M-. lean-find-tag
TAB lean-complete-tag