feat(emacs): lean-server-restart: interrupt flycheck and bring back keybinding

This commit is contained in:
Sebastian Ullrich 2016-10-19 10:09:03 -04:00 committed by Leonardo de Moura
parent 64c3927e0b
commit 87f2f5397f
3 changed files with 8 additions and 1 deletions

View file

@ -234,6 +234,7 @@ placeholder, call lean-server with --hole option, otherwise call
(local-set-key lean-keybinding-show-key 'quail-show-key)
(local-set-key lean-keybinding-set-option 'lean-set-option)
(local-set-key lean-keybinding-eval-cmd 'lean-eval-cmd)
(local-set-key lean-keybinding-server-restart 'lean-server-restart)
(local-set-key lean-keybinding-tab-indent-or-complete 'lean-tab-indent-or-complete)
(local-set-key lean-keybinding-lean-show-goal-at-pos 'lean-show-goal-at-pos)
(local-set-key lean-keybinding-lean-show-id-keyword-info 'lean-show-id-keyword-info)
@ -263,6 +264,7 @@ placeholder, call lean-server with --hole option, otherwise call
["List of errors" flycheck-list-errors (and lean-flycheck-use flycheck-mode)]
"-----------------"
["Clear all cache" lean-clear-cache t]
["Restart lean process" lean-server-restart t]
"-----------------"
("Configuration"
["Use flycheck (on-the-fly syntax check)"

View file

@ -49,7 +49,9 @@
(interactive)
(lean-server-stop)
(lean-server-start)
(when lean-flycheck-use (flycheck-buffer)))
(when lean-flycheck-use
(flycheck-stop)
(flycheck-buffer)))
(defun lean-server-send-command-handler (closure answer)
"Callback for lean-server-send-command"

View file

@ -157,6 +157,9 @@ false (nil)."
(defcustom lean-keybinding-eval-cmd (kbd "C-c C-e")
"Lean Keybinding for eval-cmd"
:group 'lean-keybinding :type 'key-sequence)
(defcustom lean-keybinding-server-restart (kbd "C-c C-r")
"Lean Keybinding for server-restart"
:group 'lean-keybinding :type 'key-sequence)
(defcustom lean-keybinding-tab-indent-or-complete (kbd "TAB")
"Lean Keybinding for tab-indent-or-complete"
:group 'lean-keybinding :type 'key-sequence)