Guest User

.spacemacs

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