Skip to content

Commit

Permalink
Update dotspacemacs/config and dotspacemacs/init occurrences
Browse files Browse the repository at this point in the history
  • Loading branch information
syl20bnr committed Sep 28, 2015
1 parent bac79f0 commit 383b1be
Show file tree
Hide file tree
Showing 23 changed files with 177 additions and 172 deletions.
6 changes: 3 additions & 3 deletions core/core-dotspacemacs.el
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Paths must have a trailing slash (ie. `~/.mycontribs/')")
"List of additional packages that will be installed wihout being
wrapped in a layer. If you need some configuration for these
packages then consider to create a layer, you can also put the
configuration in `dotspacemacs/config'.")
configuration in `dotspacemacs/user-config'.")

(defvar dotspacemacs-editing-style 'vim
"Either `vim' or `emacs'. Evil is always enabled but if the variable
Expand Down Expand Up @@ -227,7 +227,7 @@ Possible values are: `recents' `bookmarks' `projects'.")
"Synchronize declared layers in dotfile with spacemacs.
Called with `C-u' skips `dotspacemacs/user-config'.
Called with `C-u C-u' skips `dotspacemacs/user-config' and preleminary tests."
Called with `C-u C-u' skips `dotspacemacs/user-config' _and_ preleminary tests."
(interactive "P")
(when (file-exists-p dotspacemacs-filepath)
(with-current-buffer (find-file-noselect dotspacemacs-filepath)
Expand All @@ -242,7 +242,7 @@ Called with `C-u C-u' skips `dotspacemacs/user-config' and preleminary tests."
"Calling dotfile init...")
(configuration-layer/sync)
(if (member arg '(4 16))
(message (concat "Done (`dotspacemacs/config'function has "
(message (concat "Done (`dotspacemacs/user-config' function has "
"been skipped)."))
;; TODO remove support for dotspacemacs/config in 0.105
(if (fboundp 'dotspacemacs/user-config)
Expand Down
2 changes: 1 addition & 1 deletion doc/DOCUMENTATION.org
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ This sequence can be customized in your =~/.spacemacs=.
Example to set it to ~jj~:

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

Expand Down
14 changes: 7 additions & 7 deletions doc/HOWTOs.org
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

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

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

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

Expand Down
36 changes: 18 additions & 18 deletions doc/VIMUSERS.org
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,15 @@ If you are reading this, you likely want to choose the vim style. A =.spacemacs=
file will be created with the appropriate style selected. Most trivial
configuration will go in this file.

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

| Keybinding | Function |
|-------------+--------------------------------------------------------------------------|
Expand Down Expand Up @@ -412,22 +413,21 @@ the list and it will be uninstalled when you restart.

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

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

#+begin_src emacs-lisp
(defun dotspacemacs/init ()
(defun dotspacemacs/user-config ()
;; ...
;; Set escape keybinding to "jk"
(setq-default evil-escape-key-sequence "jk"))
#+end_src

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

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

*** Navigating using visual lines
Spacemacs uses the vim default of navigating by actual lines, even if they are
Expand Down
26 changes: 13 additions & 13 deletions layers/+irc/rcirc/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
- [[#description][Description]]
- [[#features][Features]]
- [[#install][Install]]
- [[#layer][Layer]]
- [[#configuration][Configuration]]
- [[#storing-the-credentials-in-your-dotfile][Storing the credentials in your dotfile]]
- [[#example][Example:]]
- [[#storing-the-credentials-in-your-dropbox][Storing the credentials in your Dropbox]]
- [[#example][Example:]]
- [[#storing-the-credentials-in-authinfo][Storing the credentials in authinfo]]
- [[#connecting-behind-a-znc-bouncer-and-storing-the-credentials-in-authinfo][Connecting behind a ZNC bouncer and storing the credentials in authinfo]]
- [[#disclaimer][Disclaimer]]
- [[#note][Note]]
- [[#layer][Layer]]
- [[#configuration][Configuration]]
- [[#storing-the-credentials-in-your-dotfile][Storing the credentials in your dotfile]]
- [[#example][Example:]]
- [[#storing-the-credentials-in-your-dropbox][Storing the credentials in your Dropbox]]
- [[#example][Example:]]
- [[#storing-the-credentials-in-authinfo][Storing the credentials in authinfo]]
- [[#connecting-behind-a-znc-bouncer-and-storing-the-credentials-in-authinfo][Connecting behind a ZNC bouncer and storing the credentials in authinfo]]
- [[#disclaimer][Disclaimer]]
- [[#note][Note]]
- [[#key-bindings][Key Bindings]]
- [[#rcirc-documentation][Rcirc documentation]]

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

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

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

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

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

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

#+BEGIN_SRC emacs-lisp
Expand Down
12 changes: 6 additions & 6 deletions layers/+lang/c-c++/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
- [[#description][Description]]
- [[#features][Features]]
- [[#install][Install]]
- [[#layer][Layer]]
- [[#default-mode-for-header-files][Default mode for header files]]
- [[#enable-clang-support][Enable Clang support]]
- [[#clang-format][clang-format]]
- [[#company-clang-and-flycheck][Company-clang and flycheck]]
- [[#layer][Layer]]
- [[#default-mode-for-header-files][Default mode for header files]]
- [[#enable-clang-support][Enable Clang support]]
- [[#clang-format][clang-format]]
- [[#company-clang-and-flycheck][Company-clang and flycheck]]
- [[#key-bindings][Key Bindings]]

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

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

#+BEGIN_SRC emacs-lisp
Expand Down
5 changes: 3 additions & 2 deletions layers/+lang/clojure/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- [[#goto][Goto]]
- [[#repl][REPL]]
- [[#tests][Tests]]
- [[#toggles][Toggles]]
- [[#debugging][Debugging]]
- [[#refactoring][Refactoring]]
- [[#reformatting][Reformatting]]
Expand Down Expand Up @@ -51,8 +52,8 @@ To use this contribution add it to your =~/.spacemacs=
Pretty symbols for anonymous functions, set literals and partial, like =(λ [a]
(+ a 5))=, =ƒ(+ % 5)=, =∈{2 4 6}= and =Ƥ=.

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

#+BEGIN_SRC emacs-lisp
(setq clojure-enable-fancify-symbols t)
Expand Down
14 changes: 7 additions & 7 deletions layers/+lang/common-lisp/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
- [[#description][Description]]
- [[#install][Install]]
- [[#key-bindings][Key Bindings]]
- [[#help][Help]]
- [[#evaluation][Evaluation]]
- [[#repl][REPL]]
- [[#compile][Compile]]
- [[#navigation][Navigation]]
- [[#macroexpansion][Macroexpansion]]
- [[#help][Help]]
- [[#evaluation][Evaluation]]
- [[#repl][REPL]]
- [[#compile][Compile]]
- [[#navigation][Navigation]]
- [[#macroexpansion][Macroexpansion]]

* Description

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

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

Expand Down
32 changes: 16 additions & 16 deletions layers/+lang/haskell/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@

* Table of Contents :TOC@4:
- [[#description][Description]]
- [[#features][Features:]]
- [[#features][Features:]]
- [[#install][Install]]
- [[#layer][Layer]]
- [[#cabal-packages][Cabal packages]]
- [[#os-x][OS X]]
- [[#optional-extras][Optional extras]]
- [[#ghc-mod-support][ghc-mod support]]
- [[#ghci-ng-support][GHCi-ng support]]
- [[#structured-haskell-mode][structured-haskell-mode]]
- [[#hindent][hindent]]
- [[#layer][Layer]]
- [[#cabal-packages][Cabal packages]]
- [[#os-x][OS X]]
- [[#optional-extras][Optional extras]]
- [[#ghc-mod-support][ghc-mod support]]
- [[#ghci-ng-support][GHCi-ng support]]
- [[#structured-haskell-mode][structured-haskell-mode]]
- [[#hindent][hindent]]
- [[#key-bindings][Key bindings]]
- [[#documentation][Documentation]]
- [[#debug][Debug]]
- [[#repl][REPL]]
- [[#cabal-commands][Cabal commands]]
- [[#cabal-files][Cabal files]]
- [[#documentation][Documentation]]
- [[#debug][Debug]]
- [[#repl][REPL]]
- [[#cabal-commands][Cabal commands]]
- [[#cabal-files][Cabal files]]

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

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

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

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

** OS X
Expand Down
30 changes: 15 additions & 15 deletions layers/+lang/java/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
* Table of Contents :TOC@4:
- [[#description][Description]]
- [[#layer-installation][Layer Installation]]
- [[#layer][Layer]]
- [[#eclim][Eclim]]
- [[#installation][Installation]]
- [[#usage][Usage]]
- [[#layer][Layer]]
- [[#eclim][Eclim]]
- [[#installation][Installation]]
- [[#usage][Usage]]
- [[#key-bindings][Key bindings]]
- [[#java-mode][Java-mode]]
- [[#project-management][Project management]]
- [[#maven][Maven]]
- [[#goto][Goto]]
- [[#refactoring][Refactoring]]
- [[#documentation-find][Documentation, Find]]
- [[#problems][Problems]]
- [[#tests][Tests]]
- [[#problems-buffer][Problems buffer]]
- [[#projects-buffer][Projects buffer]]
- [[#java-mode][Java-mode]]
- [[#project-management][Project management]]
- [[#maven][Maven]]
- [[#goto][Goto]]
- [[#refactoring][Refactoring]]
- [[#documentation-find][Documentation, Find]]
- [[#problems][Problems]]
- [[#tests][Tests]]
- [[#problems-buffer][Problems buffer]]
- [[#projects-buffer][Projects buffer]]

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

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

#+BEGIN_SRC elisp
Expand Down
16 changes: 8 additions & 8 deletions layers/+lang/latex/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

* Table of Contents :TOC@4:
- [[#description][Description]]
- [[#features][Features]]
- [[#features][Features]]
- [[#install][Install]]
- [[#layer][Layer]]
- [[#auto-completion][Auto-completion]]
- [[#previewing][Previewing]]
- [[#build-command][Build command]]
- [[#auto-fill][Auto-fill]]
- [[#layer][Layer]]
- [[#auto-completion][Auto-completion]]
- [[#previewing][Previewing]]
- [[#build-command][Build command]]
- [[#auto-fill][Auto-fill]]
- [[#keybindings][Keybindings]]
- [[#reftex][RefTeX]]
- [[#reftex][RefTeX]]
- [[#maintainer][Maintainer]]

* Description
Expand Down Expand Up @@ -43,7 +43,7 @@ Add the layer =auto-completion= to the variable

To perform full-document previews (that is, aside from the inline previewing
under ~SPC m p~), add the following to your =.spacemacs=
under =dotspacemacs/config=:
under =dotspacemacs/user-config=:

#+BEGIN_SRC emacs-lisp
(add-hook 'doc-view-mode-hook 'auto-revert-mode)
Expand Down
Loading

0 comments on commit 383b1be

Please sign in to comment.