feat(emacs/lean-mode): add key-bindings, deps

This commit is contained in:
Soonho Kong 2014-08-25 16:51:23 -07:00
parent dd5231d6a7
commit 3d3669e45e
2 changed files with 12 additions and 5 deletions

View file

@ -11,6 +11,8 @@ Requirement
``lean-mode`` requires [Emacs 24][emacs24] and following (optional) ``lean-mode`` requires [Emacs 24][emacs24] and following (optional)
packages which can be installed via <kbd>M-x package-install</kbd>. packages which can be installed via <kbd>M-x package-install</kbd>.
- [dash][dash]
- [dash-functional][dash]
- [flycheck][flycheck] - [flycheck][flycheck]
- [fill-column-indicator][fci] - [fill-column-indicator][fci]
- [whitespace-cleanup-mode][wcm] - [whitespace-cleanup-mode][wcm]
@ -24,11 +26,12 @@ code:
'("marmalade" . "http://marmalade-repo.org/packages/") t) '("marmalade" . "http://marmalade-repo.org/packages/") t)
``` ```
[emacs24]: http://www.gnu.org/software/emacs/ [emacs24]: http://www.gnu.org/software/emacs
[flycheck]: http://flycheck.readthedocs.org/en/latest/ [flycheck]: http://flycheck.readthedocs.org/en/latest
[fci]: https://github.com/alpaker/Fill-Column-Indicator [fci]: https://github.com/alpaker/Fill-Column-Indicator
[wcm]: https://github.com/purcell/whitespace-cleanup-mode [wcm]: https://github.com/purcell/whitespace-cleanup-mode
[MELPA]: http://melpa.milkbox.net/ [MELPA]: http://melpa.milkbox.net
[dash]: https://github.com/magnars/dash.el
Setup Setup
----- -----
@ -58,8 +61,9 @@ Key Bindings
|-------------------|-----------------------------------| |-------------------|-----------------------------------|
|<kbd>C-c C-x</kbd> | lean-std-exe | |<kbd>C-c C-x</kbd> | lean-std-exe |
|<kbd>C-c C-l</kbd> | lean-std-exe | |<kbd>C-c C-l</kbd> | lean-std-exe |
|<kbd>C-c C-k</kbd> | lean-hott-exe |
|<kbd>C-c C-t</kbd> | lean-eldoc-documentation-function | |<kbd>C-c C-t</kbd> | lean-eldoc-documentation-function |
|<kbd>C-c C-f</kbd> | lean-fill-placeholder | |<kbd>C-c C-f</kbd> | lean-fill-placeholder |
|<kbd>M-.</kbd> | lean-find-tag | |<kbd>M-.</kbd> | lean-find-tag |
|<kbd>TAB</kbd> | lean-complete-tag | |<kbd>TAB</kbd> | lean-complete-tag |
|<kbd>C-c C-o</kbd> | lean-set-option |
|<kbd>C-c C-e</kbd> | lean-eval-cmd |

View file

@ -8,6 +8,8 @@
(require 'generic-x) (require 'generic-x)
(require 'compile) (require 'compile)
(require 'flymake) (require 'flymake)
(require 'dash)
(require 'dash-functional)
(require 'lean-variable) (require 'lean-variable)
(require 'lean-util) (require 'lean-util)
(require 'lean-settings) (require 'lean-settings)
@ -44,7 +46,8 @@
(defun lean-set-keys () (defun lean-set-keys ()
(local-set-key "\C-c\C-x" 'lean-std-exe) (local-set-key "\C-c\C-x" 'lean-std-exe)
(local-set-key "\C-c\C-l" 'lean-std-exe) (local-set-key "\C-c\C-l" 'lean-std-exe)
(local-set-key "\C-c\C-k" 'lean-hott-exe) (local-set-key "\C-c\C-o" 'lean-set-option)
(local-set-key "\C-c\C-e" 'lean-eval-cmd)
(local-set-key "\C-c\C-t" 'lean-eldoc-documentation-function) (local-set-key "\C-c\C-t" 'lean-eldoc-documentation-function)
(local-set-key "\C-c\C-f" 'lean-fill-placeholder) (local-set-key "\C-c\C-f" 'lean-fill-placeholder)
(local-set-key "\M-." 'lean-find-tag) (local-set-key "\M-." 'lean-find-tag)