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