simple script for setting up prelude
[~bandali/configs] / spacemacs / .spacemacs
1 ;; -*- mode: dotspacemacs -*-
2 ;; This file is loaded by Spacemacs at startup.
3 ;; It must be stored in your home directory.
4
5 (defun dotspacemacs/layers ()
6 "Configuration Layers declaration."
7 (setq-default
8 ;; List of additional paths where to look for configuration layers.
9 ;; Paths must have a trailing slash (ie. `~/.mycontribs/')
10 dotspacemacs-configuration-layer-path '()
11 ;; List of configuration layers to load. If it is the symbol `all' instead
12 ;; of a list then all discovered layers will be installed.
13 dotspacemacs-configuration-layers
14 '(
15 ;; --------------------------------------------------------
16 ;; Example of useful layers you may want to use right away
17 ;; Uncomment a layer name and press C-c C-c to install it
18 ;; --------------------------------------------------------
19 auto-completion
20 better-defaults
21 (git :variables
22 git-gutter-use-fringe t)
23 markdown
24 org
25 syntax-checking
26 mu4e
27 evil
28 c-c++
29 auctex
30 html
31 clojure
32 (haskell :variables '(haskell-enable-hindent-style "chris-done"
33 haskell-enable-shm-support t))
34 emacs-lisp
35 rust
36 rust-lang
37 shell
38 themes-megapack
39 )
40 ;; A list of packages and/or extensions that will not be install and loaded.
41 dotspacemacs-excluded-packages '()
42 ;; If non-nil spacemacs will delete any orphan packages, i.e. packages that
43 ;; are declared in a layer which is not a member of
44 ;; the list `dotspacemacs-configuration-layers'
45 dotspacemacs-delete-orphan-packages t))
46
47 (defun dotspacemacs/init ()
48 "Initialization function.
49 This function is called at the very startup of Spacemacs initialization
50 before layers configuration."
51 ;; This setq-default sexp is an exhaustive list of all the supported
52 ;; spacemacs settings.
53 (setq-default
54 ;; Either `vim' or `emacs'. Evil is always enabled but if the variable
55 ;; is `emacs' then the `holy-mode' is enabled at startup.
56 dotspacemacs-editing-style 'vim
57 ;; If non nil output loading progess in `*Messages*' buffer.
58 dotspacemacs-verbose-loading nil
59 ;; Specify the startup banner. Default value is `official', it displays
60 ;; the official spacemacs logo. An integer value is the index of text
61 ;; banner, `random' chooses a random text banner in `core/banners'
62 ;; directory. A string value must be a path to a .PNG file.
63 ;; If the value is nil then no banner is displayed.
64 ;; dotspacemacs-startup-banner 'official
65 dotspacemacs-startup-banner 'official
66 ;; t if you always want to see the changelog at startup
67 dotspacemacs-always-show-changelog nil
68 ;; List of items to show in the startup buffer. If nil it is disabled.
69 ;; Possible values are: `recents' `bookmarks' `projects'."
70 dotspacemacs-startup-lists '(recents projects)
71 ;; List of themes, the first of the list is loaded when spacemacs starts.
72 ;; Press <SPC> T n to cycle to the next theme in the list (works great
73 ;; with 2 themes variants, one dark and one light)
74 ;; dotspacemacs-themes '(leuven sanityinc-tomorrow-night solarized-dark solarized-light)
75 dotspacemacs-themes '(gotham)
76 ;; If non nil the cursor color matches the state color.
77 dotspacemacs-colorize-cursor-according-to-state t
78 ;; Default font. `powerline-scale' allows to quickly tweak the mode-line
79 ;; size to make separators look not too crappy.
80 dotspacemacs-default-font '("Source Code Pro"
81 :size 14
82 :weight normal
83 :width normal
84 :powerline-scale 1.1)
85 ;; The leader key
86 dotspacemacs-leader-key "SPC"
87 ;; The leader key accessible in `emacs state' and `insert state'
88 dotspacemacs-emacs-leader-key "M-m"
89 ;; Major mode leader key is a shortcut key which is the equivalent of
90 ;; pressing `<leader> m`. Set it to `nil` to disable it.
91 dotspacemacs-major-mode-leader-key ","
92 ;; Major mode leader key accessible in `emacs state' and `insert state'
93 dotspacemacs-major-mode-emacs-leader-key "C-M-m"
94 ;; The command key used for Evil commands (ex-commands) and
95 ;; Emacs commands (M-x).
96 ;; By default the command key is `:' so ex-commands are executed like in Vim
97 ;; with `:' and Emacs commands are executed with `<leader> :'.
98 dotspacemacs-command-key ":"
99 ;; If non nil the paste micro-state is enabled. While enabled pressing `p`
100 ;; several times cycle between the kill ring content.
101 dotspacemacs-enable-paste-micro-state t
102 ;; Guide-key delay in seconds. The Guide-key is the popup buffer listing
103 ;; the commands bound to the current keystrokes.
104 dotspacemacs-guide-key-delay 0.4
105 ;; If non nil a progress bar is displayed when spacemacs is loading. This
106 ;; may increase the boot time on some systems and emacs builds, set it to
107 ;; nil ;; to boost the loading time.
108 dotspacemacs-loading-progress-bar t
109 ;; If non nil the frame is fullscreen when Emacs starts up.
110 ;; (Emacs 24.4+ only)
111 dotspacemacs-fullscreen-at-startup nil
112 ;; If non nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
113 ;; Use to disable fullscreen animations in OSX."
114 dotspacemacs-fullscreen-use-non-native nil
115 ;; If non nil the frame is maximized when Emacs starts up.
116 ;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil.
117 ;; (Emacs 24.4+ only)
118 dotspacemacs-maximized-at-startup nil
119 ;; A value from the range (0..100), in increasing opacity, which describes
120 ;; the transparency level of a frame when it's active or selected.
121 ;; Transparency can be toggled through `toggle-transparency'.
122 dotspacemacs-active-transparency 90
123 ;; A value from the range (0..100), in increasing opacity, which describes
124 ;; the transparency level of a frame when it's inactive or deselected.
125 ;; Transparency can be toggled through `toggle-transparency'.
126 dotspacemacs-inactive-transparency 90
127 ;; If non nil unicode symbols are displayed in the mode line.
128 dotspacemacs-mode-line-unicode-symbols t
129 ;; If non nil smooth scrolling (native-scrolling) is enabled. Smooth
130 ;; scrolling overrides the default behavior of Emacs which recenters the
131 ;; point when it reaches the top or bottom of the screen.
132 dotspacemacs-smooth-scrolling t
133 ;; If non-nil smartparens-strict-mode will be enabled in programming modes.
134 dotspacemacs-smartparens-strict-mode nil
135 ;; If non nil advises quit functions to keep server open when quitting.
136 dotspacemacs-persistent-server nil
137 ;; The default package repository used if no explicit repository has been
138 ;; specified with an installed package.
139 ;; Not used for now.
140 dotspacemacs-default-package-repository nil
141 ;; Disable setting the cursor color according to states
142 dotspacemacs-colorize-cursor-according-to-state nil
143 )
144 ;; User initialization goes here
145 )
146
147 (defun dotspacemacs/config ()
148 "Configuration function.
149 This function is called at the very end of Spacemacs initialization after
150 layers configuration."
151 (setq powerline-default-separator nil)
152 (setq TeX-PDF-mode t
153 Tex-command-default 'TeX)
154 (setq undo-tree-auto-save-history t
155 undo-tree-history-directory-alist
156 `(("." . ,(concat spacemacs-cache-directory "undo"))))
157 (unless (file-exists-p (concat spacemacs-cache-directory "undo"))
158 (make-directory (concat spacemacs-cache-directory "undo")))
159
160 (setq TeX-view-program-selection
161 '(((output-dvi style-pstricks)
162 "dvips and gv")
163 (output-dvi "xdvi")
164 (output-pdf "zathura")
165 (output-html "xdg-open")))
166
167 (setq TeX-view-program-list
168 '(("zathura"
169 ("zathura" (mode-io-correlate "-sync.sh")
170 " "
171 (mode-io-correlate "%n:1:%t ")
172 "%o"))))
173
174 (advice-add #'magit-key-mode-popup-committing :after
175 (lambda ()
176 (magit-key-mode-toggle-option (quote committing) "--verbose")))
177 )
178
179 ;; Do not write anything past this comment. This is where Emacs will
180 ;; auto-generate custom variable definitions.
181
182
183 (custom-set-variables
184 ;; custom-set-variables was added by Custom.
185 ;; If you edit it by hand, you could mess it up, so be careful.
186 ;; Your init file should contain only one such instance.
187 ;; If there is more than one, they won't work right.
188 '(ac-ispell-requires 4)
189 '(ahs-case-fold-search nil)
190 '(ahs-default-range (quote ahs-range-whole-buffer))
191 '(ahs-idle-interval 0.25)
192 '(ahs-idle-timer 0 t)
193 '(ahs-inhibit-face-list nil)
194 '(ring-bell-function (quote ignore) t)
195 '(send-mail-function (quote smtpmail-send-it)))
196 (custom-set-faces
197 ;; custom-set-faces was added by Custom.
198 ;; If you edit it by hand, you could mess it up, so be careful.
199 ;; Your init file should contain only one such instance.
200 ;; If there is more than one, they won't work right.
201 )