aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinwei Zhao <[email protected]>2016-11-14 21:42:12 +0800
committerJinwei Zhao <[email protected]>2016-11-14 21:42:12 +0800
commit410f8ec0fda43a034c14bb3682add37c5ada5c3b (patch)
tree6aba59c016288d288cacf5b3ecdc79b326fd7d5d
parent9b0600591fa693f3a0eac479f1a4f8d498928754 (diff)
downloadconf.d-410f8ec0fda43a034c14bb3682add37c5ada5c3b.tar.gz
add .spacemacs
-rw-r--r--emacs/.spacemacs323
1 files changed, 323 insertions, 0 deletions
diff --git a/emacs/.spacemacs b/emacs/.spacemacs
new file mode 100644
index 0000000..b999cb1
--- /dev/null
+++ b/emacs/.spacemacs
@@ -0,0 +1,323 @@
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.
7You should not put any user code in this function besides modifying the variable
8values."
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 html
35 ;; ----------------------------------------------------------------
36 ;; Example of useful layers you may want to use right away.
37 ;; Uncomment some layer names and press <SPC f e R> (Vim style) or
38 ;; <M-m f e R> (Emacs style) to install them.
39 ;; ----------------------------------------------------------------
40 helm
41 (python :variables
42 python-sort-imports-on-save t
43 python-fill-column 99
44 python-enable-yapf-format-on-save t
45 python-test-runner 'pytest)
46
47 syntax-checking
48 semantic
49 (auto-completion :variables
50 auto-completion-return-key-behavior 'complete
51 auto-completion-tab-key-behavior 'cycle
52 auto-completion-complete-with-key-sequence nil
53 auto-completion-complete-with-key-sequence-delay 0.1
54 auto-completion-enable-help-tooltip t
55 auto-completion-enable-sort-by-usage t)
56 better-defaults
57 (c-c++ :variables
58 c-c++-default-mode-for-headers 'c++-mode
59 c-c++-enable-clang-support t)
60 markdown
61 org
62 (shell :variables
63 shell-default-shell 'shell
64 shell-default-height 30
65 shell-default-position 'bottom)
66 spell-checking
67 syntax-checking
68 )
69 ;; List of additional packages that will be installed without being
70 ;; wrapped in a layer. If you need some configuration for these
71 ;; packages, then consider creating a layer. You can also put the
72 ;; configuration in `dotspacemacs/user-config'.
73 dotspacemacs-additional-packages '()
74 ;; A list of packages that cannot be updated.
75 dotspacemacs-frozen-packages '()
76 ;; A list of packages that will not be installed and loaded.
77 dotspacemacs-excluded-packages '()
78 ;; Defines the behaviour of Spacemacs when installing packages.
79 ;; Possible values are `used-only', `used-but-keep-unused' and `all'.
80 ;; `used-only' installs only explicitly used packages and uninstall any
81 ;; unused packages as well as their unused dependencies.
82 ;; `used-but-keep-unused' installs only the used packages but won't uninstall
83 ;; them if they become unused. `all' installs *all* packages supported by
84 ;; Spacemacs and never uninstall them. (default is `used-only')
85 dotspacemacs-install-packages 'used-only))
86
87(defun dotspacemacs/init ()
88 "Initialization function.
89This function is called at the very startup of Spacemacs initialization
90before layers configuration.
91You should not put any user code in there besides modifying the variable
92values."
93 ;; This setq-default sexp is an exhaustive list of all the supported
94 ;; spacemacs settings.
95 (setq-default
96 ;; If non nil ELPA repositories are contacted via HTTPS whenever it's
97 ;; possible. Set it to nil if you have no way to use HTTPS in your
98 ;; environment, otherwise it is strongly recommended to let it set to t.
99 ;; This variable has no effect if Emacs is launched with the parameter
100 ;; `--insecure' which forces the value of this variable to nil.
101 ;; (default t)
102 dotspacemacs-elpa-https t
103 ;; Maximum allowed time in seconds to contact an ELPA repository.
104 dotspacemacs-elpa-timeout 5
105 ;; If non nil then spacemacs will check for updates at startup
106 ;; when the current branch is not `develop'. Note that checking for
107 ;; new versions works via git commands, thus it calls GitHub services
108 ;; whenever you start Emacs. (default nil)
109 dotspacemacs-check-for-update nil
110 ;; If non-nil, a form that evaluates to a package directory. For example, to
111 ;; use different package directories for different Emacs versions, set this
112 ;; to `emacs-version'.
113 dotspacemacs-elpa-subdirectory nil
114 ;; One of `vim', `emacs' or `hybrid'.
115 ;; `hybrid' is like `vim' except that `insert state' is replaced by the
116 ;; `hybrid state' with `emacs' key bindings. The value can also be a list
117 ;; with `:variables' keyword (similar to layers). Check the editing styles
118 ;; section of the documentation for details on available variables.
119 ;; (default 'vim)
120 dotspacemacs-editing-style 'vim
121 ;; If non nil output loading progress in `*Messages*' buffer. (default nil)
122 dotspacemacs-verbose-loading nil
123 ;; Specify the startup banner. Default value is `official', it displays
124 ;; the official spacemacs logo. An integer value is the index of text
125 ;; banner, `random' chooses a random text banner in `core/banners'
126 ;; directory. A string value must be a path to an image format supported
127 ;; by your Emacs build.
128 ;; If the value is nil then no banner is displayed. (default 'official)
129 dotspacemacs-startup-banner 'official
130 ;; List of items to show in startup buffer or an association list of
131 ;; the form `(list-type . list-size)`. If nil then it is disabled.
132 ;; Possible values for list-type are:
133 ;; `recents' `bookmarks' `projects' `agenda' `todos'."
134 ;; List sizes may be nil, in which case
135 ;; `spacemacs-buffer-startup-lists-length' takes effect.
136 dotspacemacs-startup-lists '((recents . 5)
137 (projects . 7))
138 ;; True if the home buffer should respond to resize events.
139 dotspacemacs-startup-buffer-responsive t
140 ;; Default major mode of the scratch buffer (default `text-mode')
141 dotspacemacs-scratch-mode 'text-mode
142 ;; List of themes, the first of the list is loaded when spacemacs starts.
143 ;; Press <SPC> T n to cycle to the next theme in the list (works great
144 ;; with 2 themes variants, one dark and one light)
145 dotspacemacs-themes '(spacemacs-dark
146 spacemacs-light)
147 ;; If non nil the cursor color matches the state color in GUI Emacs.
148 dotspacemacs-colorize-cursor-according-to-state t
149 ;; Default font, or prioritized list of fonts. `powerline-scale' allows to
150 ;; quickly tweak the mode-line size to make separators look not too crappy.
151 dotspacemacs-default-font '("Source Code Pro"
152 :size 15
153 :weight normal
154 :width normal
155 :powerline-scale 1.1)
156 ;; The leader key
157 dotspacemacs-leader-key "SPC"
158 ;; The leader key accessible in `emacs state' and `insert state'
159 ;; (default "M-m")
160 dotspacemacs-emacs-leader-key "M-m"
161 ;; Major mode leader key is a shortcut key which is the equivalent of
162 ;; pressing `<leader> m`. Set it to `nil` to disable it. (default ",")
163 dotspacemacs-major-mode-leader-key ","
164 ;; Major mode leader key accessible in `emacs state' and `insert state'.
165 ;; (default "C-M-m)
166 dotspacemacs-major-mode-emacs-leader-key "C-M-m"
167 ;; The key used for Emacs commands (M-x) (after pressing on the leader key).
168 ;; (default "SPC")
169 dotspacemacs-emacs-command-key "SPC"
170 ;; These variables control whether separate commands are bound in the GUI to
171 ;; the key pairs C-i, TAB and C-m, RET.
172 ;; Setting it to a non-nil value, allows for separate commands under <C-i>
173 ;; and TAB or <C-m> and RET.
174 ;; In the terminal, these pairs are generally indistinguishable, so this only
175 ;; works in the GUI. (default nil)
176 dotspacemacs-distinguish-gui-tab nil
177 ;; If non nil `Y' is remapped to `y$' in Evil states. (default nil)
178 dotspacemacs-remap-Y-to-y$ nil
179 ;; If non-nil, the shift mappings `<' and `>' retain visual state if used
180 ;; there. (default t)
181 dotspacemacs-retain-visual-state-on-shift t
182 ;; If non-nil, J and K move lines up and down when in visual mode.
183 ;; (default nil)
184 dotspacemacs-visual-line-move-text nil
185 ;; If non nil, inverse the meaning of `g' in `:substitute' Evil ex-command.
186 ;; (default nil)
187 dotspacemacs-ex-substitute-global nil
188 ;; Name of the default layout (default "Default")
189 dotspacemacs-default-layout-name "Default"
190 ;; If non nil the default layout name is displayed in the mode-line.
191 ;; (default nil)
192 dotspacemacs-display-default-layout nil
193 ;; If non nil then the last auto saved layouts are resume automatically upon
194 ;; start. (default nil)
195 dotspacemacs-auto-resume-layouts nil
196 ;; Size (in MB) above which spacemacs will prompt to open the large file
197 ;; literally to avoid performance issues. Opening a file literally means that
198 ;; no major mode or minor modes are active. (default is 1)
199 dotspacemacs-large-file-size 1
200 ;; Location where to auto-save files. Possible values are `original' to
201 ;; auto-save the file in-place, `cache' to auto-save the file to another
202 ;; file stored in the cache directory and `nil' to disable auto-saving.
203 ;; (default 'cache)
204 dotspacemacs-auto-save-file-location 'cache
205 ;; Maximum number of rollback slots to keep in the cache. (default 5)
206 dotspacemacs-max-rollback-slots 5
207 ;; If non nil, `helm' will try to minimize the space it uses. (default nil)
208 dotspacemacs-helm-resize nil
209 ;; if non nil, the helm header is hidden when there is only one source.
210 ;; (default nil)
211 dotspacemacs-helm-no-header nil
212 ;; define the position to display `helm', options are `bottom', `top',
213 ;; `left', or `right'. (default 'bottom)
214 dotspacemacs-helm-position 'bottom
215 ;; Controls fuzzy matching in helm. If set to `always', force fuzzy matching
216 ;; in all non-asynchronous sources. If set to `source', preserve individual
217 ;; source settings. Else, disable fuzzy matching in all sources.
218 ;; (default 'always)
219 dotspacemacs-helm-use-fuzzy 'always
220 ;; If non nil the paste micro-state is enabled. When enabled pressing `p`
221 ;; several times cycle between the kill ring content. (default nil)
222 dotspacemacs-enable-paste-transient-state nil
223 ;; Which-key delay in seconds. The which-key buffer is the popup listing
224 ;; the commands bound to the current keystroke sequence. (default 0.4)
225 dotspacemacs-which-key-delay 0.4
226 ;; Which-key frame position. Possible values are `right', `bottom' and
227 ;; `right-then-bottom'. right-then-bottom tries to display the frame to the
228 ;; right; if there is insufficient space it displays it at the bottom.
229 ;; (default 'bottom)
230 dotspacemacs-which-key-position 'bottom
231 ;; If non nil a progress bar is displayed when spacemacs is loading. This
232 ;; may increase the boot time on some systems and emacs builds, set it to
233 ;; nil to boost the loading time. (default t)
234 dotspacemacs-loading-progress-bar nil
235 ;; If non nil the frame is fullscreen when Emacs starts up. (default nil)
236 ;; (Emacs 24.4+ only)
237 dotspacemacs-fullscreen-at-startup nil
238 ;; If non nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
239 ;; Use to disable fullscreen animations in OSX. (default nil)
240 dotspacemacs-fullscreen-use-non-native nil
241 ;; If non nil the frame is maximized when Emacs starts up.
242 ;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil.
243 ;; (default nil) (Emacs 24.4+ only)
244 dotspacemacs-maximized-at-startup t
245 ;; A value from the range (0..100), in increasing opacity, which describes
246 ;; the transparency level of a frame when it's active or selected.
247 ;; Transparency can be toggled through `toggle-transparency'. (default 90)
248 dotspacemacs-active-transparency 90
249 ;; A value from the range (0..100), in increasing opacity, which describes
250 ;; the transparency level of a frame when it's inactive or deselected.
251 ;; Transparency can be toggled through `toggle-transparency'. (default 90)
252 dotspacemacs-inactive-transparency 90
253 ;; If non nil show the titles of transient states. (default t)
254 dotspacemacs-show-transient-state-title t
255 ;; If non nil show the color guide hint for transient state keys. (default t)
256 dotspacemacs-show-transient-state-color-guide t
257 ;; If non nil unicode symbols are displayed in the mode line. (default t)
258 dotspacemacs-mode-line-unicode-symbols t
259 ;; If non nil smooth scrolling (native-scrolling) is enabled. Smooth
260 ;; scrolling overrides the default behavior of Emacs which recenters point
261 ;; when it reaches the top or bottom of the screen. (default t)
262 dotspacemacs-smooth-scrolling t
263 ;; If non nil line numbers are turned on in all `prog-mode' and `text-mode'
264 ;; derivatives. If set to `relative', also turns on relative line numbers.
265 ;; (default nil)
266 dotspacemacs-line-numbers t
267 ;; Code folding method. Possible values are `evil' and `origami'.
268 ;; (default 'evil)
269 dotspacemacs-folding-method 'evil
270 ;; If non-nil smartparens-strict-mode will be enabled in programming modes.
271 ;; (default nil)
272 dotspacemacs-smartparens-strict-mode nil
273 ;; If non-nil pressing the closing parenthesis `)' key in insert mode passes
274 ;; over any automatically added closing parenthesis, bracket, quote, etc…
275 ;; This can be temporary disabled by pressing `C-q' before `)'. (default nil)
276 dotspacemacs-smart-closing-parenthesis nil
277 ;; Select a scope to highlight delimiters. Possible values are `any',
278 ;; `current', `all' or `nil'. Default is `all' (highlight any scope and
279 ;; emphasis the current one). (default 'all)
280 dotspacemacs-highlight-delimiters 'all
281 ;; If non nil, advise quit functions to keep server open when quitting.
282 ;; (default nil)
283 dotspacemacs-persistent-server nil
284 ;; List of search tool executable names. Spacemacs uses the first installed
285 ;; tool of the list. Supported tools are `ag', `pt', `ack' and `grep'.
286 ;; (default '("ag" "pt" "ack" "grep"))
287 dotspacemacs-search-tools '("ag" "pt" "ack" "grep")
288 ;; The default package repository used if no explicit repository has been
289 ;; specified with an installed package.
290 ;; Not used for now. (default nil)
291 dotspacemacs-default-package-repository nil
292 ;; Delete whitespace while saving buffer. Possible values are `all'
293 ;; to aggressively delete empty line and long sequences of whitespace,
294 ;; `trailing' to delete only the whitespace at end of lines, `changed'to
295 ;; delete only whitespace for changed lines or `nil' to disable cleanup.
296 ;; (default nil)
297 dotspacemacs-whitespace-cleanup 'trailing
298 ))
299
300(defun dotspacemacs/user-init ()
301 "Initialization function for user code.
302It is called immediately after `dotspacemacs/init', before layer configuration
303executes.
304 This function is mostly useful for variables that need to be set
305before packages are loaded. If you are unsure, you should try in setting them in
306`dotspacemacs/user-config' first."
307 (setq exec-path-from-shell-arguments '("-l"))
308 )
309
310(defun dotspacemacs/user-config ()
311 "Configuration function for user code.
312This function is called at the very end of Spacemacs initialization after
313layers configuration.
314This is the place where most of your configurations should be done. Unless it is
315explicitly specified that a variable should be set before a package is loaded,
316you should place your code here."
317 (set-variable 'ycmd-server-command '("/usr/bin/python3" "/home/clarkzjw/.vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/"))
318 (setq ycmd-force-semantic-completion t)
319 (setq python-shell-interpreter "/usr/bin/python3")
320)
321
322;; Do not write anything past this comment. This is where Emacs will
323;; auto-generate custom variable definitions.
Powered by cgit v1.2.3 (git 2.41.0)