Stop syncing mail from Gmail
[~bandali/configs] / spacemacs / .spacemacs
1 ;; -*- mode: emacs-lisp -*-
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 You should not put any user code in this function besides modifying the variable
8 values."
9 (setq-default
10 ;; Base distribution to use. This is a layer contained in the directory
11 ;; `+distribution'. For now available distributions are `spacemacs-base'
12 ;; or `spacemacs'. (default 'spacemacs)
13 dotspacemacs-distribution 'spacemacs
14 ;; Lazy installation of layers (i.e. layers are installed only when a file
15 ;; with a supported type is opened). Possible values are `all', `unused'
16 ;; and `nil'. `unused' will lazy install only unused layers (i.e. layers
17 ;; not listed in variable `dotspacemacs-configuration-layers'), `all' will
18 ;; lazy install any layer that support lazy installation even the layers
19 ;; listed in `dotspacemacs-configuration-layers'. `nil' disable the lazy
20 ;; installation feature and you have to explicitly list a layer in the
21 ;; variable `dotspacemacs-configuration-layers' to install it.
22 ;; (default 'unused)
23 dotspacemacs-enable-lazy-installation 'unused
24 ;; If non-nil then Spacemacs will ask for confirmation before installing
25 ;; a layer lazily. (default t)
26 dotspacemacs-ask-for-lazy-installation t
27 ;; If non-nil layers with lazy install support are lazy installed.
28 ;; List of additional paths where to look for configuration layers.
29 ;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
30 dotspacemacs-configuration-layer-path '()
31 ;; List of configuration layers to load.
32 dotspacemacs-configuration-layers
33 '(
34 aminb
35 auto-completion
36 (better-defaults :variables
37 better-defaults-move-to-beginning-of-code-first t
38 better-defaults-move-to-end-of-code-first t)
39 bibtex
40 c-c++
41 emacs-lisp
42 git
43 haskell
44 html
45 ;; idris
46 ivy
47 ;; javascript
48 latex
49 markdown
50 org
51 ;; python
52 ;; racket
53 ;; rust
54 (shell :variables
55 shell-default-height 30
56 shell-default-position 'bottom)
57 shell-scripts
58 spell-checking
59 syntax-checking
60 themes-megapack
61 ;; version-control
62 yaml
63 )
64 ;; List of additional packages that will be installed without being
65 ;; wrapped in a layer. If you need some configuration for these
66 ;; packages, then consider creating a layer. You can also put the
67 ;; configuration in `dotspacemacs/user-config'.
68 dotspacemacs-additional-packages '()
69 ;; A list of packages that cannot be updated.
70 dotspacemacs-frozen-packages '()
71 ;; A list of packages that will not be installed and loaded.
72 dotspacemacs-excluded-packages '()
73 ;; Defines the behaviour of Spacemacs when installing packages.
74 ;; Possible values are `used-only', `used-but-keep-unused' and `all'.
75 ;; `used-only' installs only explicitly used packages and uninstall any
76 ;; unused packages as well as their unused dependencies.
77 ;; `used-but-keep-unused' installs only the used packages but won't uninstall
78 ;; them if they become unused. `all' installs *all* packages supported by
79 ;; Spacemacs and never uninstall them. (default is `used-only')
80 dotspacemacs-install-packages 'used-only))
81
82 (defun dotspacemacs/init ()
83 "Initialization function.
84 This function is called at the very startup of Spacemacs initialization
85 before layers configuration.
86 You should not put any user code in there besides modifying the variable
87 values."
88 ;; This setq-default sexp is an exhaustive list of all the supported
89 ;; spacemacs settings.
90 (setq-default
91 ;; If non-nil ELPA repositories are contacted via HTTPS whenever it's
92 ;; possible. Set it to nil if you have no way to use HTTPS in your
93 ;; environment, otherwise it is strongly recommended to let it set to t.
94 ;; This variable has no effect if Emacs is launched with the parameter
95 ;; `--insecure' which forces the value of this variable to nil.
96 ;; (default t)
97 dotspacemacs-elpa-https t
98 ;; Maximum allowed time in seconds to contact an ELPA repository.
99 dotspacemacs-elpa-timeout 5
100 ;; If non-nil then spacemacs will check for updates at startup
101 ;; when the current branch is not `develop'. Note that checking for
102 ;; new versions works via git commands, thus it calls GitHub services
103 ;; whenever you start Emacs. (default nil)
104 dotspacemacs-check-for-update nil
105 ;; If non-nil, a form that evaluates to a package directory. For example, to
106 ;; use different package directories for different Emacs versions, set this
107 ;; to `emacs-version'.
108 dotspacemacs-elpa-subdirectory nil
109 ;; One of `vim', `emacs' or `hybrid'.
110 ;; `hybrid' is like `vim' except that `insert state' is replaced by the
111 ;; `hybrid state' with `emacs' key bindings. The value can also be a list
112 ;; with `:variables' keyword (similar to layers). Check the editing styles
113 ;; section of the documentation for details on available variables.
114 ;; (default 'vim)
115 dotspacemacs-editing-style 'emacs
116 ;; If non-nil output loading progress in `*Messages*' buffer. (default nil)
117 dotspacemacs-verbose-loading nil
118 ;; Specify the startup banner. Default value is `official', it displays
119 ;; the official spacemacs logo. An integer value is the index of text
120 ;; banner, `random' chooses a random text banner in `core/banners'
121 ;; directory. A string value must be a path to an image format supported
122 ;; by your Emacs build.
123 ;; If the value is nil then no banner is displayed. (default 'official)
124 dotspacemacs-startup-banner 'official
125 ;; List of items to show in startup buffer or an association list of
126 ;; the form `(list-type . list-size)`. If nil then it is disabled.
127 ;; Possible values for list-type are:
128 ;; `recents' `bookmarks' `projects' `agenda' `todos'."
129 ;; List sizes may be nil, in which case
130 ;; `spacemacs-buffer-startup-lists-length' takes effect.
131 dotspacemacs-startup-lists '((recents . 5)
132 (projects . 7))
133 ;; True if the home buffer should respond to resize events.
134 dotspacemacs-startup-buffer-responsive t
135 ;; Default major mode of the scratch buffer (default `text-mode')
136 dotspacemacs-scratch-mode 'text-mode
137 ;; List of themes, the first of the list is loaded when spacemacs starts.
138 ;; Press <SPC> T n to cycle to the next theme in the list (works great
139 ;; with 2 themes variants, one dark and one light)
140 dotspacemacs-themes '(tango-plus
141 creamsody
142 spacemacs-dark
143 spacemacs-light
144 solarized-light
145 tao-yang)
146 ;; If non-nil the cursor color matches the state color in GUI Emacs.
147 dotspacemacs-colorize-cursor-according-to-state nil
148 ;; Default font, or prioritized list of fonts. `powerline-scale' allows to
149 ;; quickly tweak the mode-line size to make separators look not too crappy.
150 dotspacemacs-default-font '("Source Code Pro"
151 :size 13
152 :weight normal
153 :width normal
154 :powerline-scale 1.6)
155 ;; The leader key
156 dotspacemacs-leader-key "SPC"
157 ;; The key used for Emacs commands (M-x) (after pressing on the leader key).
158 ;; (default "SPC")
159 dotspacemacs-emacs-command-key "SPC"
160 ;; The key used for Vim Ex commands (default ":")
161 dotspacemacs-ex-command-key ":"
162 ;; The leader key accessible in `emacs state' and `insert state'
163 ;; (default "M-m")
164 dotspacemacs-emacs-leader-key "M-m"
165 ;; Major mode leader key is a shortcut key which is the equivalent of
166 ;; pressing `<leader> m`. Set it to `nil` to disable it. (default ",")
167 dotspacemacs-major-mode-leader-key ","
168 ;; Major mode leader key accessible in `emacs state' and `insert state'.
169 ;; (default "C-M-m")
170 dotspacemacs-major-mode-emacs-leader-key "M-SPC"
171 ;; These variables control whether separate commands are bound in the GUI to
172 ;; the key pairs C-i, TAB and C-m, RET.
173 ;; Setting it to a non-nil value, allows for separate commands under <C-i>
174 ;; and TAB or <C-m> and RET.
175 ;; In the terminal, these pairs are generally indistinguishable, so this only
176 ;; works in the GUI. (default nil)
177 dotspacemacs-distinguish-gui-tab nil
178 ;; If non-nil `Y' is remapped to `y$' in Evil states. (default nil)
179 dotspacemacs-remap-Y-to-y$ nil
180 ;; If non-nil, the shift mappings `<' and `>' retain visual state if used
181 ;; there. (default t)
182 dotspacemacs-retain-visual-state-on-shift t
183 ;; If non-nil, J and K move lines up and down when in visual mode.
184 ;; (default nil)
185 dotspacemacs-visual-line-move-text nil
186 ;; If non-nil, inverse the meaning of `g' in `:substitute' Evil ex-command.
187 ;; (default nil)
188 dotspacemacs-ex-substitute-global nil
189 ;; Name of the default layout (default "Default")
190 dotspacemacs-default-layout-name "Default"
191 ;; If non-nil the default layout name is displayed in the mode-line.
192 ;; (default nil)
193 dotspacemacs-display-default-layout nil
194 ;; If non-nil then the last auto saved layouts are resume automatically upon
195 ;; start. (default nil)
196 dotspacemacs-auto-resume-layouts nil
197 ;; Size (in MB) above which spacemacs will prompt to open the large file
198 ;; literally to avoid performance issues. Opening a file literally means that
199 ;; no major mode or minor modes are active. (default is 1)
200 dotspacemacs-large-file-size 1
201 ;; Location where to auto-save files. Possible values are `original' to
202 ;; auto-save the file in-place, `cache' to auto-save the file to another
203 ;; file stored in the cache directory and `nil' to disable auto-saving.
204 ;; (default 'cache)
205 dotspacemacs-auto-save-file-location 'cache
206 ;; Maximum number of rollback slots to keep in the cache. (default 5)
207 dotspacemacs-max-rollback-slots 5
208 ;; If non-nil, `helm' will try to minimize the space it uses. (default nil)
209 dotspacemacs-helm-resize nil
210 ;; if non-nil, the helm header is hidden when there is only one source.
211 ;; (default nil)
212 dotspacemacs-helm-no-header nil
213 ;; define the position to display `helm', options are `bottom', `top',
214 ;; `left', or `right'. (default 'bottom)
215 dotspacemacs-helm-position 'bottom
216 ;; Controls fuzzy matching in helm. If set to `always', force fuzzy matching
217 ;; in all non-asynchronous sources. If set to `source', preserve individual
218 ;; source settings. Else, disable fuzzy matching in all sources.
219 ;; (default 'always)
220 dotspacemacs-helm-use-fuzzy 'always
221 ;; If non-nil the paste micro-state is enabled. When enabled pressing `p`
222 ;; several times cycle between the kill ring content. (default nil)
223 dotspacemacs-enable-paste-transient-state nil
224 ;; Which-key delay in seconds. The which-key buffer is the popup listing
225 ;; the commands bound to the current keystroke sequence. (default 0.4)
226 dotspacemacs-which-key-delay 0.4
227 ;; Which-key frame position. Possible values are `right', `bottom' and
228 ;; `right-then-bottom'. right-then-bottom tries to display the frame to the
229 ;; right; if there is insufficient space it displays it at the bottom.
230 ;; (default 'bottom)
231 dotspacemacs-which-key-position 'bottom
232 ;; Control where `switch-to-buffer' displays the buffer. If nil,
233 ;; `switch-to-buffer' displays the buffer in the current window even if
234 ;; another same-purpose window is available. If non-nil, `switch-to-buffer'
235 ;; displays the buffer in a same-purpose window even if the buffer can be
236 ;; displayed in the current window. (default nil)
237 dotspacemacs-switch-to-buffer-prefers-purpose nil
238 ;; If non-nil a progress bar is displayed when spacemacs is loading. This
239 ;; may increase the boot time on some systems and emacs builds, set it to
240 ;; nil to boost the loading time. (default t)
241 dotspacemacs-loading-progress-bar t
242 ;; If non-nil the frame is fullscreen when Emacs starts up. (default nil)
243 ;; (Emacs 24.4+ only)
244 dotspacemacs-fullscreen-at-startup nil
245 ;; If non-nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
246 ;; Use to disable fullscreen animations in OSX. (default nil)
247 dotspacemacs-fullscreen-use-non-native nil
248 ;; If non-nil the frame is maximized when Emacs starts up.
249 ;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil.
250 ;; (default nil) (Emacs 24.4+ only)
251 dotspacemacs-maximized-at-startup nil
252 ;; A value from the range (0..100), in increasing opacity, which describes
253 ;; the transparency level of a frame when it's active or selected.
254 ;; Transparency can be toggled through `toggle-transparency'. (default 90)
255 dotspacemacs-active-transparency 90
256 ;; A value from the range (0..100), in increasing opacity, which describes
257 ;; the transparency level of a frame when it's inactive or deselected.
258 ;; Transparency can be toggled through `toggle-transparency'. (default 90)
259 dotspacemacs-inactive-transparency 90
260 ;; If non-nil show the titles of transient states. (default t)
261 dotspacemacs-show-transient-state-title t
262 ;; If non-nil show the color guide hint for transient state keys. (default t)
263 dotspacemacs-show-transient-state-color-guide t
264 ;; If non-nil unicode symbols are displayed in the mode line. (default t)
265 dotspacemacs-mode-line-unicode-symbols t
266 ;; If non-nil smooth scrolling (native-scrolling) is enabled. Smooth
267 ;; scrolling overrides the default behavior of Emacs which recenters point
268 ;; when it reaches the top or bottom of the screen. (default t)
269 dotspacemacs-smooth-scrolling t
270 ;; If non-nil line numbers are turned on in all `prog-mode' and `text-mode'
271 ;; derivatives. If set to `relative', also turns on relative line numbers.
272 ;; (default nil)
273 dotspacemacs-line-numbers nil
274 ;; Code folding method. Possible values are `evil' and `origami'.
275 ;; (default 'evil)
276 dotspacemacs-folding-method 'evil
277 ;; If non-nil smartparens-strict-mode will be enabled in programming modes.
278 ;; (default nil)
279 dotspacemacs-smartparens-strict-mode nil
280 ;; If non-nil pressing the closing parenthesis `)' key in insert mode passes
281 ;; over any automatically added closing parenthesis, bracket, quote, etc…
282 ;; This can be temporary disabled by pressing `C-q' before `)'. (default nil)
283 dotspacemacs-smart-closing-parenthesis nil
284 ;; Select a scope to highlight delimiters. Possible values are `any',
285 ;; `current', `all' or `nil'. Default is `all' (highlight any scope and
286 ;; emphasis the current one). (default 'all)
287 dotspacemacs-highlight-delimiters 'all
288 ;; If non-nil, advise quit functions to keep server open when quitting.
289 ;; (default nil)
290 dotspacemacs-persistent-server nil
291 ;; List of search tool executable names. Spacemacs uses the first installed
292 ;; tool of the list. Supported tools are `rg', `ag', `pt', `ack' and `grep'.
293 ;; (default '("rg" "ag" "pt" "ack" "grep"))
294 dotspacemacs-search-tools '("rg" "ag" "pt" "ack" "grep")
295 ;; The default package repository used if no explicit repository has been
296 ;; specified with an installed package.
297 ;; Not used for now. (default nil)
298 dotspacemacs-default-package-repository nil
299 ;; Delete whitespace while saving buffer. Possible values are `all'
300 ;; to aggressively delete empty line and long sequences of whitespace,
301 ;; `trailing' to delete only the whitespace at end of lines, `changed'to
302 ;; delete only whitespace for changed lines or `nil' to disable cleanup.
303 ;; (default nil)
304 dotspacemacs-whitespace-cleanup nil
305 ))
306
307 (defun dotspacemacs/user-init ()
308 "Initialization function for user code.
309 It is called immediately after `dotspacemacs/init', before layer configuration
310 executes.
311 This function is mostly useful for variables that need to be set
312 before packages are loaded. If you are unsure, you should try in setting them in
313 `dotspacemacs/user-config' first."
314 )
315
316 (defun dotspacemacs/user-config ()
317 "Configuration function for user code.
318 This function is called at the very end of Spacemacs initialization after
319 layers configuration.
320 This is the place where most of your configurations should be done. Unless it is
321 explicitly specified that a variable should be set before a package is loaded,
322 you should place your code here."
323
324 (setq powerline-default-separator 'slant)
325
326 ;; (setq magit-commit-arguments '("--signoff"
327 ;; "--gpg-sign=4E05246AB0BF7FFB"))
328
329 ;; Persistent undo across restarts
330 (setq undo-tree-auto-save-history t
331 undo-tree-history-directory-alist
332 `(("." . ,(concat spacemacs-cache-directory "undo"))))
333 (unless (file-exists-p (concat spacemacs-cache-directory "undo"))
334 (make-directory (concat spacemacs-cache-directory "undo")))
335
336 ;; Use pdflatex instead of latex
337 (setq TeX-PDF-mode t
338 TeX-engine 'xetex)
339
340 ;; Support zathura in TeX mode
341 (setq TeX-view-program-selection
342 '(((output-dvi style-pstricks)
343 "dvips and gv")
344 (output-dvi "xdvi")
345 (output-pdf "zathura")
346 (output-html "xdg-open")))
347 (setq TeX-view-program-list
348 '(("zathura"
349 ("zathura" (mode-io-correlate "-sync.sh")
350 " "
351 (mode-io-correlate "%n:1:%t ")
352 "%o"))))
353
354 ;; Swap : and ;
355 ;; (define-key evil-motion-state-map ";" 'evil-ex)
356 ;; (define-key evil-motion-state-map ":" 'evil-repeat-find-char)
357
358 ;; Use emacs mode for eshell
359 ;; (evil-set-initial-state 'eshell-mode 'emacs)
360 )
361
362 ;; Do not write anything past this comment. This is where Emacs will
363 ;; auto-generate custom variable definitions.
364 (defun dotspacemacs/emacs-custom-settings ()
365 "Emacs custom settings.
366 This is an auto-generated function, do not modify its content directly, use
367 Emacs customize menu instead.
368 This function is called at the very end of Spacemacs initialization."
369 (custom-set-variables
370 ;; custom-set-variables was added by Custom.
371 ;; If you edit it by hand, you could mess it up, so be careful.
372 ;; Your init file should contain only one such instance.
373 ;; If there is more than one, they won't work right.
374 '(package-selected-packages
375 (quote
376 (yaml-mode zenburn-theme tao-theme smeargle ivy-hydra info+ htmlize counsel-projectile counsel swiper company-statistics clues-theme ample-theme yasnippet haskell-mode company projectile ivy helm helm-core zonokai-theme znc zen-and-art-theme xterm-color ws-butler writeroom-mode window-numbering which-key wgrep web-mode volatile-highlights vi-tilde-fringe uuidgen use-package underwater-theme ujelly-theme twilight-theme twilight-bright-theme twilight-anti-bright-theme tronesque-theme toxi-theme toc-org tangotango-theme tango-plus-theme tango-2-theme tagedit sunny-day-theme sublime-themes subatomic256-theme subatomic-theme spacemacs-theme spaceline spacegray-theme sourcerer-theme soothe-theme solarized-theme soft-stone-theme soft-morning-theme soft-charcoal-theme smyx-theme smex slim-mode shell-pop seti-theme scss-mode sass-mode reverse-theme restart-emacs request rainbow-delimiters railscasts-theme quelpa purple-haze-theme pug-mode professional-theme popwin planet-theme phoenix-dark-pink-theme phoenix-dark-mono-theme persp-mode pcre2el pastels-on-dark-theme paradox orgit organic-green-theme org-ref org-projectile org-present org-pomodoro org-plus-contrib org-download org-bullets open-junk-file omtose-phellack-theme oldlace-theme occidental-theme obsidian-theme noctilux-theme niflheim-theme neotree naquadah-theme mwim mustang-theme multi-term mu4e-maildirs-extension mu4e-alert move-text monokai-theme monochrome-theme molokai-theme moe-theme mmm-mode minimal-theme material-theme markdown-toc majapahit-theme magit-gitflow macrostep lush-theme lorem-ipsum linum-relative link-hint light-soap-theme less-css-mode jbeans-theme jazz-theme ivy-purpose ir-black-theme intero insert-shebang inkpot-theme indent-guide ido-vertical-mode hungry-delete hlint-refactor hl-todo hindent highlight-parentheses highlight-numbers highlight-indentation hide-comnt heroku-theme hemisu-theme help-fns+ helm-make hc-zenburn-theme haskell-snippets gruvbox-theme gruber-darker-theme grandshell-theme gotham-theme google-translate golden-ratio gnuplot gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link gh-md gandalf-theme flyspell-correct-ivy flycheck-pos-tip flycheck-haskell flx-ido flatui-theme flatland-theme fish-mode firebelly-theme fill-column-indicator farmhouse-theme fancy-battery eyebrowse expand-region exec-path-from-shell evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-magit evil-lisp-state evil-indent-plus evil-iedit-state evil-exchange evil-escape evil-ediff evil-args evil-anzu eval-sexp-fu espresso-theme eshell-z eshell-prompt-extras esh-help erc-yt erc-view-log erc-social-graph erc-image erc-hl-nicks emmet-mode elisp-slime-nav dumb-jump dracula-theme django-theme disaster define-word darktooth-theme darkokai-theme darkmine-theme darkburn-theme dakrone-theme cyberpunk-theme crux creamsody-theme company-web company-shell company-ghci company-ghc company-cabal company-c-headers company-auctex column-enforce-mode color-theme-sanityinc-tomorrow color-theme-sanityinc-solarized cmm-mode cmake-mode clean-aindent-mode clang-format cherry-blossom-theme busybee-theme bubbleberry-theme birds-of-paradise-plus-theme badwolf-theme auto-yasnippet auto-highlight-symbol auto-dictionary auto-compile auctex-latexmk apropospriate-theme anti-zenburn-theme ample-zen-theme alect-themes aggressive-indent afternoon-theme adaptive-wrap ace-window ace-link ac-ispell))))
377 (custom-set-faces
378 ;; custom-set-faces was added by Custom.
379 ;; If you edit it by hand, you could mess it up, so be careful.
380 ;; Your init file should contain only one such instance.
381 ;; If there is more than one, they won't work right.
382 )
383 )