-
Notifications
You must be signed in to change notification settings - Fork 23
/
packages.el
84 lines (77 loc) · 2.63 KB
/
packages.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
;;; packages.el --- coq Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
;;
;; Author: Olivier Verdier <[email protected]>
;; URL: https://github.com/olivierverdier/spacemacs-coq
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
;; List of all packages to install and/or initialize. Built-in packages
;; which require an initialization must be listed explicitly in the list.
(setq coq-packages
'(
company-coq
(proof-general :location local)
))
;; List of packages to exclude.
(setq coq-excluded-packages '())
;; For each package, define a function coq/init-<package-name>
;;
;; (defun coq/init-my-package ()
;; "Initialize my package"
;; )
;;
;; Often the body of an initialize function uses `use-package'
;; For more info on `use-package', see readme:
;; https://github.com/jwiegley/use-package
(defun coq/init-company-coq ()
"Enter company-coq-mode upon entering coq-mode."
(use-package company-coq
:defer t
:init
(add-hook 'coq-mode-hook #'company-coq-mode)))
(defun setup-coq-keys ()
(evil-define-key 'normal coq-mode-map
(kbd "M-l") 'proof-goto-point
(kbd "M-k") 'proof-undo-last-successful-command
(kbd "M-j") 'proof-assert-next-command-interactive
)
(evil-define-key 'insert coq-mode-map
(kbd "M-l") 'proof-goto-point
(kbd "M-k") 'proof-undo-last-successful-command
(kbd "M-j") 'proof-assert-next-command-interactive
)
)
(defun coq/init-proof-general ()
"Initialize Proof General."
;; Setup from Proof General README, using a path from the configuration. Proof General
;; lazily loads from proof-site, so there's no need to use-package it.
(load proof-general-path)
(spacemacs/set-leader-keys-for-major-mode 'coq-mode
"n" 'proof-assert-next-command-interactive
"u" 'proof-undo-last-successful-command
"h" 'company-coq-doc
"ll" 'proof-layout-windows
"lp" 'proof-prf
"x" 'proof-shell-exit
"s" 'proof-find-theorems
"?" 'coq-Check
"p" 'coq-Print
";" 'pg-insert-last-output-as-comment
"o" 'company-coq-occur
(or dotspacemacs-major-mode-leader-key ",") 'proof-goto-point
)
(setup-coq-keys)
;;; Hybrid mode by default
(setq-default proof-three-window-mode-policy 'hybrid)
;; no splash screen
(setq proof-splash-seen t)
;; Better colour scheme which work for me
(custom-set-faces
'(proof-eager-annotation-face ((t (:background "medium blue"))))
'(proof-error-face ((t (:background "dark red"))))
'(proof-warning-face ((t (:background "indianred3"))))
)
)