Skip to content

Commit 383b1be

Browse files
committed
Update dotspacemacs/config and dotspacemacs/init occurrences
1 parent bac79f0 commit 383b1be

23 files changed

Lines changed: 177 additions & 172 deletions

File tree

core/core-dotspacemacs.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Paths must have a trailing slash (ie. `~/.mycontribs/')")
6565
"List of additional packages that will be installed wihout being
6666
wrapped in a layer. If you need some configuration for these
6767
packages then consider to create a layer, you can also put the
68-
configuration in `dotspacemacs/config'.")
68+
configuration in `dotspacemacs/user-config'.")
6969

7070
(defvar dotspacemacs-editing-style 'vim
7171
"Either `vim' or `emacs'. Evil is always enabled but if the variable
@@ -227,7 +227,7 @@ Possible values are: `recents' `bookmarks' `projects'.")
227227
"Synchronize declared layers in dotfile with spacemacs.
228228
229229
Called with `C-u' skips `dotspacemacs/user-config'.
230-
Called with `C-u C-u' skips `dotspacemacs/user-config' and preleminary tests."
230+
Called with `C-u C-u' skips `dotspacemacs/user-config' _and_ preleminary tests."
231231
(interactive "P")
232232
(when (file-exists-p dotspacemacs-filepath)
233233
(with-current-buffer (find-file-noselect dotspacemacs-filepath)
@@ -242,7 +242,7 @@ Called with `C-u C-u' skips `dotspacemacs/user-config' and preleminary tests."
242242
"Calling dotfile init...")
243243
(configuration-layer/sync)
244244
(if (member arg '(4 16))
245-
(message (concat "Done (`dotspacemacs/config'function has "
245+
(message (concat "Done (`dotspacemacs/user-config' function has "
246246
"been skipped)."))
247247
;; TODO remove support for dotspacemacs/config in 0.105
248248
(if (fboundp 'dotspacemacs/user-config)

doc/DOCUMENTATION.org

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ This sequence can be customized in your =~/.spacemacs=.
11331133
Example to set it to ~jj~:
11341134

11351135
#+begin_src emacs-lisp
1136-
(defun dotspacemacs/init ()
1136+
(defun dotspacemacs/user-config ()
11371137
(setq-default evil-escape-key-sequence "jj"))
11381138
#+end_src
11391139

doc/HOWTOs.org

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
** Table of Contents :TOC@4:
44
- [[#compilation-of-quick-how-tos-for-spacemacs][Compilation of quick HOW-TOs for Spacemacs]]
5-
- [[#disable-a-package-completely][Disable a package completely]]
6-
- [[#disable-a-package-only-for-a-specific-major-mode][Disable a package only for a specific major-mode]]
7-
- [[#disable-company-for-a-specific-major-mode][Disable company for a specific major-mode]]
8-
- [[#change-special-buffer-rules][Change special buffer rules]]
9-
- [[#enable-navigation-by-visual-lines][Enable navigation by visual lines]]
5+
- [[#disable-a-package-completely][Disable a package completely]]
6+
- [[#disable-a-package-only-for-a-specific-major-mode][Disable a package only for a specific major-mode]]
7+
- [[#disable-company-for-a-specific-major-mode][Disable company for a specific major-mode]]
8+
- [[#change-special-buffer-rules][Change special buffer rules]]
9+
- [[#enable-navigation-by-visual-lines][Enable navigation by visual lines]]
1010

1111
** Disable a package completely
1212
To completely disable a package and effectively uninstalling it even if
@@ -21,7 +21,7 @@ name to it:
2121
** Disable a package only for a specific major-mode
2222
This is done by removing the hook added by Spacemacs. For example to
2323
remove =flycheck= support in python buffers, look for the function
24-
=dotspacemacs/config= in your dotfile and add the following code:
24+
=dotspacemacs/user-config= in your dotfile and add the following code:
2525

2626
#+begin_src emacs-lisp
2727
(remove-hook 'python-mode-hook 'flycheck-mode)
@@ -33,7 +33,7 @@ remove =flycheck= support in python buffers, look for the function
3333
** Disable company for a specific major-mode
3434
It may be handy to disable =company= for a given mode if you plan on
3535
configuring =auto-complete= instead. On easy way to do it is to use the
36-
macro =spacemacs|disable-company= in the function =dotspacemacs/config=
36+
macro =spacemacs|disable-company= in the function =dotspacemacs/user-config=
3737
of your dotfile. The following snippet disables company for
3838
=python-mode=:
3939

doc/VIMUSERS.org

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,15 @@ If you are reading this, you likely want to choose the vim style. A =.spacemacs=
190190
file will be created with the appropriate style selected. Most trivial
191191
configuration will go in this file.
192192

193-
There are three top-level function in the file: =dotspacemacs/layers=,
194-
=dotspacemacs/init=, and =dotspacemacs/config=. The =dotspacemacs/layers=
195-
function exist only to enable and disable layers and packages. The
196-
=dotspacemacs/init= function is run before anything else during startup and
197-
contains many Spacemacs settings. You will almost never need to touch this
198-
function except to change default Spacemacs settings. The =dotspacemacs/config=
199-
function is the one you will use the most. This is where you define any user
200-
configuration.
193+
There are four top-level function in the file: =dotspacemacs/layers=,
194+
=dotspacemacs/init=, =dotspacemacs/user-init= and =dotspacemacs/user-config=.
195+
The =dotspacemacs/layers= function exist only to enable and disable layers and
196+
packages. The =dotspacemacs/init= function is run before anything else during
197+
startup and contains Spacemacs settings. You will never need to touch this
198+
function except to change default Spacemacs settings.
199+
The =dotspacemacs/user-init= function is also run before anything else and
200+
contains user specific configuration. The =dotspacemacs/user-config= function
201+
is the one you will use the most. This is where you define any user configuration.
201202

202203
| Keybinding | Function |
203204
|-------------+--------------------------------------------------------------------------|
@@ -412,22 +413,21 @@ the list and it will be uninstalled when you restart.
412413

413414
** Common tweaks
414415
This section is for things many will want to change. All of these settings go in
415-
the =dotspacemacs/config= function in your =.spacemacs= unless otherwise noted.
416+
the =dotspacemacs/user-config= function in your =.spacemacs= unless otherwise noted.
416417

417418
*** Changing the escape key
418419
Spacemacs uses =[[https://github.com/syl20bnr/evil-escape][evil-escape]]= to
419420
allow escaping from many =major-modes= with one keybinding. You can customize
420-
the variable in your =dotspacemacs/init= like this:
421+
the variable in your =dotspacemacs/user-config= like this:
421422

422423
#+begin_src emacs-lisp
423-
(defun dotspacemacs/init ()
424+
(defun dotspacemacs/user-config ()
424425
;; ...
425426
;; Set escape keybinding to "jk"
426427
(setq-default evil-escape-key-sequence "jk"))
427428
#+end_src
428429

429-
This is one of the few variables that must be set in =dotspacemacs/init=. More
430-
documentation is found in the =evil-escape= [[https://github.com/syl20bnr/evil-escape/blob/master/README.md][README]].
430+
More documentation is found in the =evil-escape= [[https://github.com/syl20bnr/evil-escape/blob/master/README.md][README]].
431431

432432
*** Changing the colorscheme
433433
The =.spacemacs= file contains the =dotspacemacs-themes= variable in the
@@ -460,11 +460,11 @@ you can [[#uninstalling-a-package][uninstall]] the =evil-search-highlight-persis
460460
*** Sessions
461461
Spacemacs does not automatically restore your windows and buffers when you
462462
reopen it. If you use vim sessions regularly you may want to add
463-
=(desktop-save-mode t)= to you =dotspacemacs/config= in your =.spacemacs= to get
464-
this functionality. You will then be able to load the saved session using ~SPC :
465-
desktop-read~. The location of the desktop file can be set with the variable
466-
=desktop-dirname=. To automatically load a session, add =(desktop-read)= to your
467-
=.spacemacs=.
463+
=(desktop-save-mode t)= to your =dotspacemacs/user-config= in your =.spacemacs=
464+
to get this functionality. You will then be able to load the saved session
465+
using ~SPC : desktop-read~. The location of the desktop file can be set with
466+
the variable =desktop-dirname=. To automatically load a session,
467+
add =(desktop-read)= to your =.spacemacs=.
468468

469469
*** Navigating using visual lines
470470
Spacemacs uses the vim default of navigating by actual lines, even if they are

layers/+irc/rcirc/README.org

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
- [[#description][Description]]
77
- [[#features][Features]]
88
- [[#install][Install]]
9-
- [[#layer][Layer]]
10-
- [[#configuration][Configuration]]
11-
- [[#storing-the-credentials-in-your-dotfile][Storing the credentials in your dotfile]]
12-
- [[#example][Example:]]
13-
- [[#storing-the-credentials-in-your-dropbox][Storing the credentials in your Dropbox]]
14-
- [[#example][Example:]]
15-
- [[#storing-the-credentials-in-authinfo][Storing the credentials in authinfo]]
16-
- [[#connecting-behind-a-znc-bouncer-and-storing-the-credentials-in-authinfo][Connecting behind a ZNC bouncer and storing the credentials in authinfo]]
17-
- [[#disclaimer][Disclaimer]]
18-
- [[#note][Note]]
9+
- [[#layer][Layer]]
10+
- [[#configuration][Configuration]]
11+
- [[#storing-the-credentials-in-your-dotfile][Storing the credentials in your dotfile]]
12+
- [[#example][Example:]]
13+
- [[#storing-the-credentials-in-your-dropbox][Storing the credentials in your Dropbox]]
14+
- [[#example][Example:]]
15+
- [[#storing-the-credentials-in-authinfo][Storing the credentials in authinfo]]
16+
- [[#connecting-behind-a-znc-bouncer-and-storing-the-credentials-in-authinfo][Connecting behind a ZNC bouncer and storing the credentials in authinfo]]
17+
- [[#disclaimer][Disclaimer]]
18+
- [[#note][Note]]
1919
- [[#key-bindings][Key Bindings]]
2020
- [[#rcirc-documentation][Rcirc documentation]]
2121

@@ -57,7 +57,7 @@ There are several ways to configure rcirc supported by the layer:
5757
*** Storing the credentials in your dotfile
5858

5959
You can store your servers configuration along with your credentials in the
60-
=dotspacemacs/config= of your dotfile.
60+
=dotspacemacs/user-config= of your dotfile.
6161

6262
*Important:* This method is the less secured and it is not recommended since
6363
your dotfile is often stored in a public repository and is not crypted. This
@@ -115,7 +115,7 @@ rcirc.
115115
#+END_SRC
116116

117117
3) At last you need to provide your servers configuration in the
118-
=dotspacemacs/config= function of your dotfile:
118+
=dotspacemacs/user-config= function of your dotfile:
119119

120120
#+BEGIN_SRC emacs-lisp
121121
(setq rcirc-server-alist
@@ -162,7 +162,7 @@ For now authinfo is mandatory to use the ZNC configuration.
162162
retrieve the credentials for the ZNC configuration.
163163

164164
3) Then setup your servers configuration using subdomains in the
165-
=dotspacemacs/config= function of your dotfile. The =:auth= keyword arguments
165+
=dotspacemacs/user-config= function of your dotfile. The =:auth= keyword arguments
166166
will be replaced by the credentials stored in your =~/.authinfo.gpg=.
167167

168168
#+BEGIN_SRC emacs-lisp

layers/+lang/c-c++/README.org

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
- [[#description][Description]]
88
- [[#features][Features]]
99
- [[#install][Install]]
10-
- [[#layer][Layer]]
11-
- [[#default-mode-for-header-files][Default mode for header files]]
12-
- [[#enable-clang-support][Enable Clang support]]
13-
- [[#clang-format][clang-format]]
14-
- [[#company-clang-and-flycheck][Company-clang and flycheck]]
10+
- [[#layer][Layer]]
11+
- [[#default-mode-for-header-files][Default mode for header files]]
12+
- [[#enable-clang-support][Enable Clang support]]
13+
- [[#clang-format][clang-format]]
14+
- [[#company-clang-and-flycheck][Company-clang and flycheck]]
1515
- [[#key-bindings][Key Bindings]]
1616

1717
* Description
@@ -76,7 +76,7 @@ located in the same directory as the file being edited, or in any of its parent
7676
directories (otherwise a default style will be used).
7777

7878
You can add snippets similar to the following to bind clang-format to either a
79-
particular mode or all modes in your =dotspacemacs/config= (within your
79+
particular mode or all modes in your =dotspacemacs/user-config= (within your
8080
=~/.spacemacs=):
8181

8282
#+BEGIN_SRC emacs-lisp

layers/+lang/clojure/README.org

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- [[#goto][Goto]]
1919
- [[#repl][REPL]]
2020
- [[#tests][Tests]]
21+
- [[#toggles][Toggles]]
2122
- [[#debugging][Debugging]]
2223
- [[#refactoring][Refactoring]]
2324
- [[#reformatting][Reformatting]]
@@ -51,8 +52,8 @@ To use this contribution add it to your =~/.spacemacs=
5152
Pretty symbols for anonymous functions, set literals and partial, like =(λ [a]
5253
(+ a 5))=, =ƒ(+ % 5)=, =∈{2 4 6}= and =Ƥ=.
5354

54-
To enable this feature, add the following snippet to the dotspacemacs/config
55-
section of your =~/.spacemacs= file:
55+
To enable this feature, add the following snippet to the
56+
=dotspacemacs/user-config= section of your =~/.spacemacs= file:
5657

5758
#+BEGIN_SRC emacs-lisp
5859
(setq clojure-enable-fancify-symbols t)

layers/+lang/common-lisp/README.org

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
- [[#description][Description]]
77
- [[#install][Install]]
88
- [[#key-bindings][Key Bindings]]
9-
- [[#help][Help]]
10-
- [[#evaluation][Evaluation]]
11-
- [[#repl][REPL]]
12-
- [[#compile][Compile]]
13-
- [[#navigation][Navigation]]
14-
- [[#macroexpansion][Macroexpansion]]
9+
- [[#help][Help]]
10+
- [[#evaluation][Evaluation]]
11+
- [[#repl][REPL]]
12+
- [[#compile][Compile]]
13+
- [[#navigation][Navigation]]
14+
- [[#macroexpansion][Macroexpansion]]
1515

1616
* Description
1717

@@ -34,7 +34,7 @@ This layer defaults to using [[http://www.sbcl.org/][sbcl]]. If you want to use
3434
of Common Lisp, you can specify it in your =~/.spacemacs=
3535

3636
#+BEGIN_SRC emacs-lisp
37-
(defun dotspacemacs/config ()
37+
(defun dotspacemacs/user-config ()
3838
(setq inferior-lisp-program "/path/to/your/lisp"))
3939
#+END_SRC
4040

layers/+lang/haskell/README.org

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44

55
* Table of Contents :TOC@4:
66
- [[#description][Description]]
7-
- [[#features][Features:]]
7+
- [[#features][Features:]]
88
- [[#install][Install]]
9-
- [[#layer][Layer]]
10-
- [[#cabal-packages][Cabal packages]]
11-
- [[#os-x][OS X]]
12-
- [[#optional-extras][Optional extras]]
13-
- [[#ghc-mod-support][ghc-mod support]]
14-
- [[#ghci-ng-support][GHCi-ng support]]
15-
- [[#structured-haskell-mode][structured-haskell-mode]]
16-
- [[#hindent][hindent]]
9+
- [[#layer][Layer]]
10+
- [[#cabal-packages][Cabal packages]]
11+
- [[#os-x][OS X]]
12+
- [[#optional-extras][Optional extras]]
13+
- [[#ghc-mod-support][ghc-mod support]]
14+
- [[#ghci-ng-support][GHCi-ng support]]
15+
- [[#structured-haskell-mode][structured-haskell-mode]]
16+
- [[#hindent][hindent]]
1717
- [[#key-bindings][Key bindings]]
18-
- [[#documentation][Documentation]]
19-
- [[#debug][Debug]]
20-
- [[#repl][REPL]]
21-
- [[#cabal-commands][Cabal commands]]
22-
- [[#cabal-files][Cabal files]]
18+
- [[#documentation][Documentation]]
19+
- [[#debug][Debug]]
20+
- [[#repl][REPL]]
21+
- [[#cabal-commands][Cabal commands]]
22+
- [[#cabal-files][Cabal files]]
2323

2424
* Description
2525
This layer adds support for the [[https://www.haskell.org/][Haskell]] language.
@@ -62,13 +62,13 @@ pick up shell PATH.
6262
#+END_SRC
6363

6464
_Alternatively_, you can add it to the Emacs =exec-path= variable in the
65-
=dotspacemacs/init= function of your =.spacemacs= file:
65+
=dotspacemacs/user-init= function of your =.spacemacs= file:
6666

6767
#+BEGIN_SRC emacs-lisp
6868
(add-to-list 'exec-path "~/.cabal/bin/")
6969
#+END_SRC
7070

71-
*Note:* it is important to add the path in the =dotspacemacs/init= function,
71+
*Note:* it is important to add the path in the =dotspacemacs/user-init= function,
7272
so that the path is added before any layers is loaded.
7373

7474
** OS X

layers/+lang/java/README.org

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55
* Table of Contents :TOC@4:
66
- [[#description][Description]]
77
- [[#layer-installation][Layer Installation]]
8-
- [[#layer][Layer]]
9-
- [[#eclim][Eclim]]
10-
- [[#installation][Installation]]
11-
- [[#usage][Usage]]
8+
- [[#layer][Layer]]
9+
- [[#eclim][Eclim]]
10+
- [[#installation][Installation]]
11+
- [[#usage][Usage]]
1212
- [[#key-bindings][Key bindings]]
13-
- [[#java-mode][Java-mode]]
14-
- [[#project-management][Project management]]
15-
- [[#maven][Maven]]
16-
- [[#goto][Goto]]
17-
- [[#refactoring][Refactoring]]
18-
- [[#documentation-find][Documentation, Find]]
19-
- [[#problems][Problems]]
20-
- [[#tests][Tests]]
21-
- [[#problems-buffer][Problems buffer]]
22-
- [[#projects-buffer][Projects buffer]]
13+
- [[#java-mode][Java-mode]]
14+
- [[#project-management][Project management]]
15+
- [[#maven][Maven]]
16+
- [[#goto][Goto]]
17+
- [[#refactoring][Refactoring]]
18+
- [[#documentation-find][Documentation, Find]]
19+
- [[#problems][Problems]]
20+
- [[#tests][Tests]]
21+
- [[#problems-buffer][Problems buffer]]
22+
- [[#projects-buffer][Projects buffer]]
2323

2424
* Description
2525
This layer adds support for the Java language using the [[http://eclim.org][Eclim]] client/server.
@@ -39,7 +39,7 @@ searching, code validation, and many more.
3939
*** Installation
4040
For installation check the [[http://eclim.org/install.html#download][official page]].
4141

42-
Then set the =Eclipse= and =Eclim= paths in =dotspacemacs/config=,
42+
Then set the =Eclipse= and =Eclim= paths in =dotspacemacs/user-config=,
4343
for instance:
4444

4545
#+BEGIN_SRC elisp

0 commit comments

Comments
 (0)