-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackages.el
69 lines (62 loc) · 2.11 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
;;; packages.el --- pixie Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; 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 pixie-packages
'(
;; package names go here
;; clojure-mode
inf-clojure
pixie-mode
))
;; List of packages to exclude.
(setq pixie-excluded-packages '())
(defun pixie/post-init-inf-clojure ()
(add-hook 'pixie-mode-hook 'inf-clojure-minor-mode))
(defun pixie/init-pixie-mode ()
(use-package pixie-mode
:defer t
:config
(progn
(defun spacemacs/pixie-eval-last-sexp ()
"Call `inf-clojure-eval-last-sexp' and switch to REPL buffer in `insert state'"
(interactive)
(inf-clojure-eval-last-sexp)
(inf-clojure-switch-to-repl t)
(evil-insert-state))
(defun spacemacs/pixie-eval-region (start end)
"Call `inf-clojure-eval-region' and switch to REPL buffer in `insert state'"
(interactive "r")
(if (region-active-p)
(progn
(let ((region (buffer-substring-no-properties start end)))
(inf-clojure-switch-to-repl t)
(inf-clojure-eval-string region)
(evil-insert-state)))
(message "No region.")))
(evil-leader/set-key-for-mode 'pixie-mode
;; REPL
"msi" 'inf-clojure-switch-to-repl
"msb" 'inf-clojure-eval-last-sexp
"msB" 'spacemacs/pixie-eval-last-sexp
"msr" 'inf-clojure-eval-region
"msR" 'spacemacs/pixie-eval-region)
)))
;; For each package, define a function pixie/init-<package-name>
;;
;; (defun pixie/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