[spacemacs] add some layers and stuff from before
[~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
899452ca
AB
14 ;; If non-nil layers with lazy install support are lazy installed.
15 ;; (default nil)
16 dotspacemacs-enable-lazy-installation nil
8068706c 17 ;; List of additional paths where to look for configuration layers.
271181b4 18 ;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
8068706c
AB
19 dotspacemacs-configuration-layer-path '()
20 ;; List of configuration layers to load. If it is the symbol `all' instead
21 ;; of a list then all discovered layers will be installed.
73b4f2fc
AB
22 dotspacemacs-configuration-layers
23 '(
9d455f77
AB
24 ;; ----------------------------------------------------------------
25 ;; Example of useful layers you may want to use right away.
26 ;; Uncomment some layer names and press <SPC f e R> (Vim style) or
27 ;; <M-m f e R> (Emacs style) to install them.
28 ;; ----------------------------------------------------------------
899452ca 29 spacemacs-helm
39889680 30 auto-completion
899452ca 31 ;; better-defaults
9d455f77 32 emacs-lisp
39889680
AB
33 git
34 latex
35 markdown
36 org
37 rust
38 (shell :variables
39 shell-default-height 30
40 shell-default-position 'bottom)
41 spell-checking
42 syntax-checking
271181b4 43 ;; version-control
73b4f2fc 44 )
271181b4 45 ;; List of additional packages that will be installed without being
9d455f77 46 ;; wrapped in a layer. If you need some configuration for these
899452ca 47 ;; packages, then consider creating a layer. You can also put the
271181b4 48 ;; configuration in `dotspacemacs/user-config'.
9d455f77 49 dotspacemacs-additional-packages '()
8068706c
AB
50 ;; A list of packages and/or extensions that will not be install and loaded.
51 dotspacemacs-excluded-packages '()
52 ;; If non-nil spacemacs will delete any orphan packages, i.e. packages that
53 ;; are declared in a layer which is not a member of
271181b4 54 ;; the list `dotspacemacs-configuration-layers'. (default t)
8068706c 55 dotspacemacs-delete-orphan-packages t))
a41dc7e9
AB
56
57(defun dotspacemacs/init ()
8068706c
AB
58 "Initialization function.
59This function is called at the very startup of Spacemacs initialization
271181b4
AB
60before layers configuration.
61You should not put any user code in there besides modifying the variable
62values."
8068706c
AB
63 ;; This setq-default sexp is an exhaustive list of all the supported
64 ;; spacemacs settings.
65 (setq-default
271181b4
AB
66 ;; If non nil ELPA repositories are contacted via HTTPS whenever it's
67 ;; possible. Set it to nil if you have no way to use HTTPS in your
68 ;; environment, otherwise it is strongly recommended to let it set to t.
69 ;; This variable has no effect if Emacs is launched with the parameter
70 ;; `--insecure' which forces the value of this variable to nil.
71 ;; (default t)
72 dotspacemacs-elpa-https t
73 ;; Maximum allowed time in seconds to contact an ELPA repository.
74 dotspacemacs-elpa-timeout 5
75 ;; If non nil then spacemacs will check for updates at startup
76 ;; when the current branch is not `develop'. (default t)
77 dotspacemacs-check-for-update t
78 ;; One of `vim', `emacs' or `hybrid'. Evil is always enabled but if the
79 ;; variable is `emacs' then the `holy-mode' is enabled at startup. `hybrid'
80 ;; uses emacs key bindings for vim's insert mode, but otherwise leaves evil
81 ;; unchanged. (default 'vim)
73b4f2fc 82 dotspacemacs-editing-style 'vim
271181b4 83 ;; If non nil output loading progress in `*Messages*' buffer. (default nil)
73b4f2fc 84 dotspacemacs-verbose-loading nil
74f45a15
AB
85 ;; Specify the startup banner. Default value is `official', it displays
86 ;; the official spacemacs logo. An integer value is the index of text
87 ;; banner, `random' chooses a random text banner in `core/banners'
9d455f77
AB
88 ;; directory. A string value must be a path to an image format supported
89 ;; by your Emacs build.
271181b4 90 ;; If the value is nil then no banner is displayed. (default 'official)
74f45a15 91 dotspacemacs-startup-banner 'official
73b4f2fc 92 ;; List of items to show in the startup buffer. If nil it is disabled.
899452ca 93 ;; Possible values are: `recents' `bookmarks' `projects' `agenda' `todos'.
271181b4 94 ;; (default '(recents projects))
73b4f2fc 95 dotspacemacs-startup-lists '(recents projects)
271181b4
AB
96 ;; Number of recent files to show in the startup buffer. Ignored if
97 ;; `dotspacemacs-startup-lists' doesn't include `recents'. (default 5)
98 dotspacemacs-startup-recent-list-size 5
899452ca
AB
99 ;; Default major mode of the scratch buffer (default `text-mode')
100 dotspacemacs-scratch-mode 'text-mode
8068706c
AB
101 ;; List of themes, the first of the list is loaded when spacemacs starts.
102 ;; Press <SPC> T n to cycle to the next theme in the list (works great
103 ;; with 2 themes variants, one dark and one light)
271181b4 104 dotspacemacs-themes '(spacemacs-dark
9d455f77 105 spacemacs-light
271181b4
AB
106 solarized-light
107 solarized-dark
108 leuven
9d455f77
AB
109 monokai
110 zenburn)
271181b4 111 ;; If non nil the cursor color matches the state color in GUI Emacs.
8068706c
AB
112 dotspacemacs-colorize-cursor-according-to-state t
113 ;; Default font. `powerline-scale' allows to quickly tweak the mode-line
114 ;; size to make separators look not too crappy.
ecac7742 115 dotspacemacs-default-font '("Source Code Pro"
6f29ca43 116 :size 14
8068706c
AB
117 :weight normal
118 :width normal
6f29ca43 119 :powerline-scale 1.6)
8068706c
AB
120 ;; The leader key
121 dotspacemacs-leader-key "SPC"
73b4f2fc 122 ;; The leader key accessible in `emacs state' and `insert state'
271181b4 123 ;; (default "M-m")
73b4f2fc 124 dotspacemacs-emacs-leader-key "M-m"
8068706c 125 ;; Major mode leader key is a shortcut key which is the equivalent of
271181b4 126 ;; pressing `<leader> m`. Set it to `nil` to disable it. (default ",")
8068706c 127 dotspacemacs-major-mode-leader-key ","
271181b4
AB
128 ;; Major mode leader key accessible in `emacs state' and `insert state'.
129 ;; (default "C-M-m)
73b4f2fc 130 dotspacemacs-major-mode-emacs-leader-key "C-M-m"
899452ca
AB
131 ;; The key used for Emacs commands (M-x) (after pressing on the leader key).
132 ;; (default "SPC")
133 dotspacemacs-emacs-command-key "SPC"
271181b4
AB
134 ;; These variables control whether separate commands are bound in the GUI to
135 ;; the key pairs C-i, TAB and C-m, RET.
136 ;; Setting it to a non-nil value, allows for separate commands under <C-i>
137 ;; and TAB or <C-m> and RET.
138 ;; In the terminal, these pairs are generally indistinguishable, so this only
139 ;; works in the GUI. (default nil)
140 dotspacemacs-distinguish-gui-tab nil
899452ca
AB
141 ;; If non nil `Y' is remapped to `y$' in Evil states. (default nil)
142 dotspacemacs-remap-Y-to-y$ nil
143 ;; If non nil, inverse the meaning of `g' in `:substitute' Evil ex-command.
144 ;; (default nil)
145 dotspacemacs-ex-substitute-global nil
271181b4
AB
146 ;; Name of the default layout (default "Default")
147 dotspacemacs-default-layout-name "Default"
148 ;; If non nil the default layout name is displayed in the mode-line.
149 ;; (default nil)
150 dotspacemacs-display-default-layout nil
151 ;; If non nil then the last auto saved layouts are resume automatically upon
152 ;; start. (default nil)
153 dotspacemacs-auto-resume-layouts nil
3e1228d0
AB
154 ;; Location where to auto-save files. Possible values are `original' to
155 ;; auto-save the file in-place, `cache' to auto-save the file to another
156 ;; file stored in the cache directory and `nil' to disable auto-saving.
271181b4 157 ;; (default 'cache)
3e1228d0 158 dotspacemacs-auto-save-file-location 'cache
271181b4
AB
159 ;; Maximum number of rollback slots to keep in the cache. (default 5)
160 dotspacemacs-max-rollback-slots 5
9d455f77 161 ;; If non nil then `ido' replaces `helm' for some commands. For now only
271181b4
AB
162 ;; `find-files' (SPC f f), `find-spacemacs-file' (SPC f e s), and
163 ;; `find-contrib-file' (SPC f e c) are replaced. (default nil)
164 dotspacemacs-use-ido nil
165 ;; If non nil, `helm' will try to minimize the space it uses. (default nil)
166 dotspacemacs-helm-resize nil
167 ;; if non nil, the helm header is hidden when there is only one source.
168 ;; (default nil)
169 dotspacemacs-helm-no-header nil
170 ;; define the position to display `helm', options are `bottom', `top',
171 ;; `left', or `right'. (default 'bottom)
172 dotspacemacs-helm-position 'bottom
9d455f77 173 ;; If non nil the paste micro-state is enabled. When enabled pressing `p`
271181b4 174 ;; several times cycle between the kill ring content. (default nil)
899452ca 175 dotspacemacs-enable-paste-transient-state nil
271181b4
AB
176 ;; Which-key delay in seconds. The which-key buffer is the popup listing
177 ;; the commands bound to the current keystroke sequence. (default 0.4)
178 dotspacemacs-which-key-delay 0.4
179 ;; Which-key frame position. Possible values are `right', `bottom' and
180 ;; `right-then-bottom'. right-then-bottom tries to display the frame to the
181 ;; right; if there is insufficient space it displays it at the bottom.
182 ;; (default 'bottom)
183 dotspacemacs-which-key-position 'bottom
8068706c
AB
184 ;; If non nil a progress bar is displayed when spacemacs is loading. This
185 ;; may increase the boot time on some systems and emacs builds, set it to
271181b4 186 ;; nil to boost the loading time. (default t)
8068706c 187 dotspacemacs-loading-progress-bar t
271181b4 188 ;; If non nil the frame is fullscreen when Emacs starts up. (default nil)
8068706c
AB
189 ;; (Emacs 24.4+ only)
190 dotspacemacs-fullscreen-at-startup nil
191 ;; If non nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
271181b4 192 ;; Use to disable fullscreen animations in OSX. (default nil)
8068706c
AB
193 dotspacemacs-fullscreen-use-non-native nil
194 ;; If non nil the frame is maximized when Emacs starts up.
195 ;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil.
271181b4 196 ;; (default nil) (Emacs 24.4+ only)
8068706c
AB
197 dotspacemacs-maximized-at-startup nil
198 ;; A value from the range (0..100), in increasing opacity, which describes
199 ;; the transparency level of a frame when it's active or selected.
271181b4 200 ;; Transparency can be toggled through `toggle-transparency'. (default 90)
8068706c
AB
201 dotspacemacs-active-transparency 90
202 ;; A value from the range (0..100), in increasing opacity, which describes
203 ;; the transparency level of a frame when it's inactive or deselected.
271181b4 204 ;; Transparency can be toggled through `toggle-transparency'. (default 90)
8068706c 205 dotspacemacs-inactive-transparency 90
899452ca
AB
206 ;; If non nil show the titles of transient states. (default t)
207 dotspacemacs-show-transient-state-title t
208 ;; If non nil show the color guide hint for transient state keys. (default t)
209 dotspacemacs-show-transient-state-color-guide t
271181b4 210 ;; If non nil unicode symbols are displayed in the mode line. (default t)
8068706c
AB
211 dotspacemacs-mode-line-unicode-symbols t
212 ;; If non nil smooth scrolling (native-scrolling) is enabled. Smooth
899452ca
AB
213 ;; scrolling overrides the default behavior of Emacs which recenters point
214 ;; when it reaches the top or bottom of the screen. (default t)
8068706c 215 dotspacemacs-smooth-scrolling t
271181b4
AB
216 ;; If non nil line numbers are turned on in all `prog-mode' and `text-mode'
217 ;; derivatives. If set to `relative', also turns on relative line numbers.
218 ;; (default nil)
219 dotspacemacs-line-numbers nil
8068706c 220 ;; If non-nil smartparens-strict-mode will be enabled in programming modes.
271181b4 221 ;; (default nil)
8068706c 222 dotspacemacs-smartparens-strict-mode nil
271181b4
AB
223 ;; Select a scope to highlight delimiters. Possible values are `any',
224 ;; `current', `all' or `nil'. Default is `all' (highlight any scope and
225 ;; emphasis the current one). (default 'all)
9d455f77 226 dotspacemacs-highlight-delimiters 'all
8068706c 227 ;; If non nil advises quit functions to keep server open when quitting.
271181b4 228 ;; (default nil)
8068706c 229 dotspacemacs-persistent-server nil
9d455f77
AB
230 ;; List of search tool executable names. Spacemacs uses the first installed
231 ;; tool of the list. Supported tools are `ag', `pt', `ack' and `grep'.
271181b4 232 ;; (default '("ag" "pt" "ack" "grep"))
9d455f77 233 dotspacemacs-search-tools '("ag" "pt" "ack" "grep")
8068706c
AB
234 ;; The default package repository used if no explicit repository has been
235 ;; specified with an installed package.
271181b4 236 ;; Not used for now. (default nil)
5828c5c7 237 dotspacemacs-default-package-repository nil
899452ca
AB
238 ;; Delete whitespace while saving buffer. Possible values are `all'
239 ;; to aggressively delete empty line and long sequences of whitespace,
240 ;; `trailing' to delete only the whitespace at end of lines, `changed'to
241 ;; delete only whitespace for changed lines or `nil' to disable cleanup.
242 ;; (default nil)
243 dotspacemacs-whitespace-cleanup nil
39889680
AB
244 ;; Disable setting the cursor color according to states
245 ;; dotspacemacs-colorize-cursor-according-to-state nil
271181b4
AB
246 ))
247
248(defun dotspacemacs/user-init ()
249 "Initialization function for user code.
899452ca
AB
250It is called immediately after `dotspacemacs/init'. You are free to put almost
251any user code here. The exception is org related code, which should be placed
252in `dotspacemacs/user-config'."
a41dc7e9
AB
253 )
254
271181b4
AB
255(defun dotspacemacs/user-config ()
256 "Configuration function for user code.
257This function is called at the very end of Spacemacs initialization after
258layers configuration. You are free to put any user code."
6f29ca43 259 (setq powerline-default-separator 'slant)
39889680
AB
260
261 ;; (setq undo-tree-auto-save-history t
262 ;; undo-tree-history-directory-alist
263 ;; `(("." . ,(concat spacemacs-cache-directory "undo"))))
264 ;; (unless (file-exists-p (concat spacemacs-cache-directory "undo"))
265 ;; (make-directory (concat spacemacs-cache-directory "undo")))
266
267 ;; Use pdflatex instead of latex
268 (setq TeX-PDF-mode t)
269
270 ;; Support zathura in TeX mode
271 (setq TeX-view-program-selection
272 '(((output-dvi style-pstricks)
273 "dvips and gv")
274 (output-dvi "xdvi")
275 (output-pdf "zathura")
276 (output-html "xdg-open")))
277 (setq TeX-view-program-list
278 '(("zathura"
279 ("zathura" (mode-io-correlate "-sync.sh")
280 " "
281 (mode-io-correlate "%n:1:%t ")
282 "%o"))))
283
284 ;; Swap : and ;
285 (define-key evil-motion-state-map ";" 'evil-ex)
286 (define-key evil-motion-state-map ":" 'evil-repeat-find-char)
287
288 ;; Set the erc nick completion postfix to ", "
289 ;; (setq erc-pcomplete-nick-postfix ", ")
899452ca 290 )
a41dc7e9 291
8068706c 292;; Do not write anything past this comment. This is where Emacs will
a41dc7e9 293;; auto-generate custom variable definitions.
39889680
AB
294(custom-set-variables
295 ;; custom-set-variables was added by Custom.
296 ;; If you edit it by hand, you could mess it up, so be careful.
297 ;; Your init file should contain only one such instance.
298 ;; If there is more than one, they won't work right.
299 '(package-selected-packages
300 (quote
301 (toml-mode rustfmt racer flycheck-rust company-auctex auctex-latexmk auctex xterm-color toc-org shell-pop org-repo-todo org-present org-pomodoro org-plus-contrib org-bullets multi-term mmm-mode markdown-toc markdown-mode htmlize helm-flyspell helm-company helm-c-yasnippet gnuplot gh-md flycheck-pos-tip flycheck eshell-z eshell-prompt-extras esh-help company-statistics company-quickhelp company auto-yasnippet auto-dictionary ac-ispell smeargle orgit magit-gitflow helm-gitignore gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger evil-magit ws-butler window-numbering which-key volatile-highlights vi-tilde-fringe use-package spacemacs-theme spaceline smooth-scrolling restart-emacs rainbow-delimiters quelpa popwin persp-mode pcre2el paradox page-break-lines open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint leuven-theme info+ indent-guide ido-vertical-mode hungry-delete hl-todo highlight-parentheses highlight-numbers highlight-indentation help-fns+ helm-themes helm-swoop helm-projectile helm-mode-manager helm-make helm-flx helm-descbinds helm-ag google-translate golden-ratio flx-ido fill-column-indicator fancy-battery f expand-region exec-path-from-shell evil-visualstar evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state evil-jumper evil-indent-plus evil-iedit-state evil-exchange evil-escape evil-ediff evil-args evil-anzu eval-sexp-fu elisp-slime-nav define-word clean-aindent-mode buffer-move bracketed-paste auto-highlight-symbol auto-compile aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line))))
302(custom-set-faces
303 ;; custom-set-faces was added by Custom.
304 ;; If you edit it by hand, you could mess it up, so be careful.
305 ;; Your init file should contain only one such instance.
306 ;; If there is more than one, they won't work right.
307 '(company-tooltip-common ((t (:inherit company-tooltip :weight bold :underline nil))))
308 '(company-tooltip-common-selection ((t (:inherit company-tooltip-selection :weight bold :underline nil)))))