Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Vierkantor committed Dec 17, 2019
0 parents commit 94a26f0
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
20 changes: 20 additions & 0 deletions +lang/lean/config.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
;;; config.el --- Lean Layer config File for Spacemacs
;;
;; Copyright (c) 2019 Vierkantor
;;
;; Based on Agda2 Layer for Spacemacs by
;; Author: FreeSalad <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3

;; (defvar agda-mode-path 'use-helper
;; "Indicates the location of the agda-mode package (the file
;; `agda2.el') If `nil', it is assumed to be already available by
;; Emacs. If `use-helper', the `agda-mode' executable is used to
;; find its location.")

(spacemacs|define-jump-handlers agda2-mode lean-find-definition)
(spacemacs|defvar-company-backends lean-mode)
46 changes: 46 additions & 0 deletions +lang/lean/packages.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
;;; packages.el --- Lean Layer packages File for Spacemacs
;;
;; Based on Agda Layer for Spacemacs by:
;; Author: Oliver Charles <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3

(defconst lean-packages
'((lean-mode :location elpa)
company
company-lean
helm-lean
golden-ratio))

(defun lean/post-init-company ()
(spacemacs|add-company-hook lean-mode)
(push 'company-capf company-backends-lean-mode))

(defun lean/post-init-company-lean ())
(defun lean/post-init-helm-lean ())

(defun lean/init-lean-mode ()
(use-package lean-mode
:defer t
:config
(progn
(spacemacs/set-leader-keys-for-major-mode 'lean-mode
" " 'company-complete
"." 'lean-toggle-show-goal
"d" 'helm-lean-definitions
"f" 'lean-toggle-next-error
"g" 'lean-find-definition
"k" 'quail-show-key
"l" 'lean-std-exe
"r" 'lean-hole
"xr" 'lean-server-restart
"xs" 'lean-server-switch-version))))

(defun lean/pre-init-golden-ratio ()
(spacemacs|use-package-add-hook golden-ratio
:post-config
(add-to-list 'golden-ratio-exclude-buffer-names
"*Lean information*")))

0 comments on commit 94a26f0

Please sign in to comment.