[spacemacs] start from scratch
[~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
AB
29 spacemacs-helm
30 ;; auto-completion
31 ;; better-defaults
9d455f77 32 emacs-lisp
899452ca
AB
33 ;; git
34 ;; markdown
35 ;; org
36 ;; (shell :variables
37 ;; shell-default-height 30
38 ;; shell-default-position 'bottom)
39 ;; spell-checking
40 ;; syntax-checking
271181b4 41 ;; version-control
73b4f2fc 42 )
271181b4 43 ;; List of additional packages that will be installed without being
9d455f77 44 ;; wrapped in a layer. If you need some configuration for these
899452ca 45 ;; packages, then consider creating a layer. You can also put the
271181b4 46 ;; configuration in `dotspacemacs/user-config'.
9d455f77 47 dotspacemacs-additional-packages '()
8068706c
AB
48 ;; A list of packages and/or extensions that will not be install and loaded.
49 dotspacemacs-excluded-packages '()
50 ;; If non-nil spacemacs will delete any orphan packages, i.e. packages that
51 ;; are declared in a layer which is not a member of
271181b4 52 ;; the list `dotspacemacs-configuration-layers'. (default t)
8068706c 53 dotspacemacs-delete-orphan-packages t))
a41dc7e9
AB
54
55(defun dotspacemacs/init ()
8068706c
AB
56 "Initialization function.
57This function is called at the very startup of Spacemacs initialization
271181b4
AB
58before layers configuration.
59You should not put any user code in there besides modifying the variable
60values."
8068706c
AB
61 ;; This setq-default sexp is an exhaustive list of all the supported
62 ;; spacemacs settings.
63 (setq-default
271181b4
AB
64 ;; If non nil ELPA repositories are contacted via HTTPS whenever it's
65 ;; possible. Set it to nil if you have no way to use HTTPS in your
66 ;; environment, otherwise it is strongly recommended to let it set to t.
67 ;; This variable has no effect if Emacs is launched with the parameter
68 ;; `--insecure' which forces the value of this variable to nil.
69 ;; (default t)
70 dotspacemacs-elpa-https t
71 ;; Maximum allowed time in seconds to contact an ELPA repository.
72 dotspacemacs-elpa-timeout 5
73 ;; If non nil then spacemacs will check for updates at startup
74 ;; when the current branch is not `develop'. (default t)
75 dotspacemacs-check-for-update t
76 ;; One of `vim', `emacs' or `hybrid'. Evil is always enabled but if the
77 ;; variable is `emacs' then the `holy-mode' is enabled at startup. `hybrid'
78 ;; uses emacs key bindings for vim's insert mode, but otherwise leaves evil
79 ;; unchanged. (default 'vim)
73b4f2fc 80 dotspacemacs-editing-style 'vim
271181b4 81 ;; If non nil output loading progress in `*Messages*' buffer. (default nil)
73b4f2fc 82 dotspacemacs-verbose-loading nil
74f45a15
AB
83 ;; Specify the startup banner. Default value is `official', it displays
84 ;; the official spacemacs logo. An integer value is the index of text
85 ;; banner, `random' chooses a random text banner in `core/banners'
9d455f77
AB
86 ;; directory. A string value must be a path to an image format supported
87 ;; by your Emacs build.
271181b4 88 ;; If the value is nil then no banner is displayed. (default 'official)
74f45a15 89 dotspacemacs-startup-banner 'official
73b4f2fc 90 ;; List of items to show in the startup buffer. If nil it is disabled.
899452ca 91 ;; Possible values are: `recents' `bookmarks' `projects' `agenda' `todos'.
271181b4 92 ;; (default '(recents projects))
73b4f2fc 93 dotspacemacs-startup-lists '(recents projects)
271181b4
AB
94 ;; Number of recent files to show in the startup buffer. Ignored if
95 ;; `dotspacemacs-startup-lists' doesn't include `recents'. (default 5)
96 dotspacemacs-startup-recent-list-size 5
899452ca
AB
97 ;; Default major mode of the scratch buffer (default `text-mode')
98 dotspacemacs-scratch-mode 'text-mode
8068706c
AB
99 ;; List of themes, the first of the list is loaded when spacemacs starts.
100 ;; Press <SPC> T n to cycle to the next theme in the list (works great
101 ;; with 2 themes variants, one dark and one light)
271181b4 102 dotspacemacs-themes '(spacemacs-dark
9d455f77 103 spacemacs-light
271181b4
AB
104 solarized-light
105 solarized-dark
106 leuven
9d455f77
AB
107 monokai
108 zenburn)
271181b4 109 ;; If non nil the cursor color matches the state color in GUI Emacs.
8068706c
AB
110 dotspacemacs-colorize-cursor-according-to-state t
111 ;; Default font. `powerline-scale' allows to quickly tweak the mode-line
112 ;; size to make separators look not too crappy.
ecac7742 113 dotspacemacs-default-font '("Source Code Pro"
271181b4 114 :size 13
8068706c
AB
115 :weight normal
116 :width normal
117 :powerline-scale 1.1)
118 ;; The leader key
119 dotspacemacs-leader-key "SPC"
73b4f2fc 120 ;; The leader key accessible in `emacs state' and `insert state'
271181b4 121 ;; (default "M-m")
73b4f2fc 122 dotspacemacs-emacs-leader-key "M-m"
8068706c 123 ;; Major mode leader key is a shortcut key which is the equivalent of
271181b4 124 ;; pressing `<leader> m`. Set it to `nil` to disable it. (default ",")
8068706c 125 dotspacemacs-major-mode-leader-key ","
271181b4
AB
126 ;; Major mode leader key accessible in `emacs state' and `insert state'.
127 ;; (default "C-M-m)
73b4f2fc 128 dotspacemacs-major-mode-emacs-leader-key "C-M-m"
899452ca
AB
129 ;; The key used for Emacs commands (M-x) (after pressing on the leader key).
130 ;; (default "SPC")
131 dotspacemacs-emacs-command-key "SPC"
271181b4
AB
132 ;; These variables control whether separate commands are bound in the GUI to
133 ;; the key pairs C-i, TAB and C-m, RET.
134 ;; Setting it to a non-nil value, allows for separate commands under <C-i>
135 ;; and TAB or <C-m> and RET.
136 ;; In the terminal, these pairs are generally indistinguishable, so this only
137 ;; works in the GUI. (default nil)
138 dotspacemacs-distinguish-gui-tab nil
899452ca
AB
139 ;; If non nil `Y' is remapped to `y$' in Evil states. (default nil)
140 dotspacemacs-remap-Y-to-y$ nil
141 ;; If non nil, inverse the meaning of `g' in `:substitute' Evil ex-command.
142 ;; (default nil)
143 dotspacemacs-ex-substitute-global nil
271181b4
AB
144 ;; Name of the default layout (default "Default")
145 dotspacemacs-default-layout-name "Default"
146 ;; If non nil the default layout name is displayed in the mode-line.
147 ;; (default nil)
148 dotspacemacs-display-default-layout nil
149 ;; If non nil then the last auto saved layouts are resume automatically upon
150 ;; start. (default nil)
151 dotspacemacs-auto-resume-layouts nil
3e1228d0
AB
152 ;; Location where to auto-save files. Possible values are `original' to
153 ;; auto-save the file in-place, `cache' to auto-save the file to another
154 ;; file stored in the cache directory and `nil' to disable auto-saving.
271181b4 155 ;; (default 'cache)
3e1228d0 156 dotspacemacs-auto-save-file-location 'cache
271181b4
AB
157 ;; Maximum number of rollback slots to keep in the cache. (default 5)
158 dotspacemacs-max-rollback-slots 5
9d455f77 159 ;; If non nil then `ido' replaces `helm' for some commands. For now only
271181b4
AB
160 ;; `find-files' (SPC f f), `find-spacemacs-file' (SPC f e s), and
161 ;; `find-contrib-file' (SPC f e c) are replaced. (default nil)
162 dotspacemacs-use-ido nil
163 ;; If non nil, `helm' will try to minimize the space it uses. (default nil)
164 dotspacemacs-helm-resize nil
165 ;; if non nil, the helm header is hidden when there is only one source.
166 ;; (default nil)
167 dotspacemacs-helm-no-header nil
168 ;; define the position to display `helm', options are `bottom', `top',
169 ;; `left', or `right'. (default 'bottom)
170 dotspacemacs-helm-position 'bottom
9d455f77 171 ;; If non nil the paste micro-state is enabled. When enabled pressing `p`
271181b4 172 ;; several times cycle between the kill ring content. (default nil)
899452ca 173 dotspacemacs-enable-paste-transient-state nil
271181b4
AB
174 ;; Which-key delay in seconds. The which-key buffer is the popup listing
175 ;; the commands bound to the current keystroke sequence. (default 0.4)
176 dotspacemacs-which-key-delay 0.4
177 ;; Which-key frame position. Possible values are `right', `bottom' and
178 ;; `right-then-bottom'. right-then-bottom tries to display the frame to the
179 ;; right; if there is insufficient space it displays it at the bottom.
180 ;; (default 'bottom)
181 dotspacemacs-which-key-position 'bottom
8068706c
AB
182 ;; If non nil a progress bar is displayed when spacemacs is loading. This
183 ;; may increase the boot time on some systems and emacs builds, set it to
271181b4 184 ;; nil to boost the loading time. (default t)
8068706c 185 dotspacemacs-loading-progress-bar t
271181b4 186 ;; If non nil the frame is fullscreen when Emacs starts up. (default nil)
8068706c
AB
187 ;; (Emacs 24.4+ only)
188 dotspacemacs-fullscreen-at-startup nil
189 ;; If non nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
271181b4 190 ;; Use to disable fullscreen animations in OSX. (default nil)
8068706c
AB
191 dotspacemacs-fullscreen-use-non-native nil
192 ;; If non nil the frame is maximized when Emacs starts up.
193 ;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil.
271181b4 194 ;; (default nil) (Emacs 24.4+ only)
8068706c
AB
195 dotspacemacs-maximized-at-startup nil
196 ;; A value from the range (0..100), in increasing opacity, which describes
197 ;; the transparency level of a frame when it's active or selected.
271181b4 198 ;; Transparency can be toggled through `toggle-transparency'. (default 90)
8068706c
AB
199 dotspacemacs-active-transparency 90
200 ;; A value from the range (0..100), in increasing opacity, which describes
201 ;; the transparency level of a frame when it's inactive or deselected.
271181b4 202 ;; Transparency can be toggled through `toggle-transparency'. (default 90)
8068706c 203 dotspacemacs-inactive-transparency 90
899452ca
AB
204 ;; If non nil show the titles of transient states. (default t)
205 dotspacemacs-show-transient-state-title t
206 ;; If non nil show the color guide hint for transient state keys. (default t)
207 dotspacemacs-show-transient-state-color-guide t
271181b4 208 ;; If non nil unicode symbols are displayed in the mode line. (default t)
8068706c
AB
209 dotspacemacs-mode-line-unicode-symbols t
210 ;; If non nil smooth scrolling (native-scrolling) is enabled. Smooth
899452ca
AB
211 ;; scrolling overrides the default behavior of Emacs which recenters point
212 ;; when it reaches the top or bottom of the screen. (default t)
8068706c 213 dotspacemacs-smooth-scrolling t
271181b4
AB
214 ;; If non nil line numbers are turned on in all `prog-mode' and `text-mode'
215 ;; derivatives. If set to `relative', also turns on relative line numbers.
216 ;; (default nil)
217 dotspacemacs-line-numbers nil
8068706c 218 ;; If non-nil smartparens-strict-mode will be enabled in programming modes.
271181b4 219 ;; (default nil)
8068706c 220 dotspacemacs-smartparens-strict-mode nil
271181b4
AB
221 ;; Select a scope to highlight delimiters. Possible values are `any',
222 ;; `current', `all' or `nil'. Default is `all' (highlight any scope and
223 ;; emphasis the current one). (default 'all)
9d455f77 224 dotspacemacs-highlight-delimiters 'all
8068706c 225 ;; If non nil advises quit functions to keep server open when quitting.
271181b4 226 ;; (default nil)
8068706c 227 dotspacemacs-persistent-server nil
9d455f77
AB
228 ;; List of search tool executable names. Spacemacs uses the first installed
229 ;; tool of the list. Supported tools are `ag', `pt', `ack' and `grep'.
271181b4 230 ;; (default '("ag" "pt" "ack" "grep"))
9d455f77 231 dotspacemacs-search-tools '("ag" "pt" "ack" "grep")
8068706c
AB
232 ;; The default package repository used if no explicit repository has been
233 ;; specified with an installed package.
271181b4 234 ;; Not used for now. (default nil)
5828c5c7 235 dotspacemacs-default-package-repository nil
899452ca
AB
236 ;; Delete whitespace while saving buffer. Possible values are `all'
237 ;; to aggressively delete empty line and long sequences of whitespace,
238 ;; `trailing' to delete only the whitespace at end of lines, `changed'to
239 ;; delete only whitespace for changed lines or `nil' to disable cleanup.
240 ;; (default nil)
241 dotspacemacs-whitespace-cleanup nil
271181b4
AB
242 ))
243
244(defun dotspacemacs/user-init ()
245 "Initialization function for user code.
899452ca
AB
246It is called immediately after `dotspacemacs/init'. You are free to put almost
247any user code here. The exception is org related code, which should be placed
248in `dotspacemacs/user-config'."
a41dc7e9
AB
249 )
250
271181b4
AB
251(defun dotspacemacs/user-config ()
252 "Configuration function for user code.
253This function is called at the very end of Spacemacs initialization after
254layers configuration. You are free to put any user code."
899452ca 255 )
a41dc7e9 256
8068706c 257;; Do not write anything past this comment. This is where Emacs will
a41dc7e9 258;; auto-generate custom variable definitions.