Guest User

Untitled

a guest
Jul 14th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 27.41 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.   "Layer configuration:
  7. This function should only modify configuration layer settings."
  8.   (setq-default
  9.    ;; Base distribution to use. This is a layer contained in the directory
  10.    ;; `+distribution'. For now available distributions are `spacemacs-base'
  11.    ;; or `spacemacs'. (default 'spacemacs)
  12.    dotspacemacs-distribution 'spacemacs
  13.  
  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.  
  25.    ;; If non-nil then Spacemacs will ask for confirmation before installing
  26.    ;; a layer lazily. (default t)
  27.    dotspacemacs-ask-for-lazy-installation t
  28.  
  29.    ;; If non-nil layers with lazy install support are lazy installed.
  30.    ;; List of additional paths where to look for configuration layers.
  31.    ;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
  32.    dotspacemacs-configuration-layer-path '()
  33.  
  34.    ;; List of configuration layers to load.
  35.    dotspacemacs-configuration-layers
  36.    '(
  37.      ;; ----------------------------------------------------------------
  38.      ;; Example of useful layers you may want to use right away.
  39.      ;; Uncomment some layer names and press `SPC f e R' (Vim style) or
  40.      ;; `M-m f e R' (Emacs style) to install them.
  41.      ;; ----------------------------------------------------------------
  42.      (python :variables python-backend 'lsp)
  43.      lsp
  44.      themes-megapack
  45.      evil-snipe
  46.      helm
  47.      (auto-completion :variables
  48.                       auto-completion-return-key-behavior 'complete
  49.                       auto-completion-tab-key-behavior 'cycle
  50.                       auto-completion-complete-with-key-sequence nil
  51.                       auto-completion-complete-with-key-sequence-delay 0.05
  52.                       auto-completion-private-snippets-directory nil
  53.                       auto-completion-enable-help-tooltip t
  54.                       auto-completion-enable-snippets-in-popup t
  55.                       auto-completion-enable-sort-by-usage t
  56.                       spacemacs-default-company-backends '(company-lsp))
  57.      better-defaults
  58.      emacs-lisp
  59.      git
  60.      markdown
  61.      neotree
  62.      org
  63.      (shell :variables
  64.             shell-default-height 30
  65.             shell-default-position 'bottom)
  66.      syntax-checking
  67.      version-control
  68.      )
  69.  
  70.    ;; List of additional packages that will be installed without being
  71.    ;; wrapped in a layer. If you need some configuration for these
  72.    ;; packages, then consider creating a layer. You can also put the
  73.    ;; configuration in `dotspacemacs/user-config'.
  74.    ;; To use a local version of a package, use the `:location' property:
  75.    ;; '(your-package :location "~/path/to/your-package/")
  76.    ;; Also include the dependencies as they will not be resolved automatically.
  77.    dotspacemacs-additional-packages '(color-identifiers-mode
  78.                                       lsp-rust
  79.                                       cquery)
  80.  
  81.    ;; A list of packages that cannot be updated.
  82.    dotspacemacs-frozen-packages '()
  83.  
  84.    ;; A list of packages that will not be installed and loaded.
  85.    dotspacemacs-excluded-packages '()
  86.  
  87.    ;; Defines the behaviour of Spacemacs when installing packages.
  88.    ;; Possible values are `used-only', `used-but-keep-unused' and `all'.
  89.    ;; `used-only' installs only explicitly used packages and deletes any unused
  90.    ;; packages as well as their unused dependencies. `used-but-keep-unused'
  91.    ;; installs only the used packages but won't delete unused ones. `all'
  92.    ;; installs *all* packages supported by Spacemacs and never uninstalls them.
  93.    ;; (default is `used-only')
  94.    dotspacemacs-install-packages 'used-only))
  95.  
  96. (defun dotspacemacs/init ()
  97.   "Initialization:
  98. This function is called at the very beginning of Spacemacs startup,
  99. before layer configuration.
  100. It should only modify the values of Spacemacs settings."
  101.   ;; This setq-default sexp is an exhaustive list of all the supported
  102.   ;; spacemacs settings.
  103.   (setq-default
  104.    ;; If non-nil then enable support for the portable dumper. You'll need
  105.    ;; to compile Emacs 27 from source following the instructions in file
  106.    ;; EXPERIMENTAL.org at to root of the git repository.
  107.    ;; (default nil)
  108.    dotspacemacs-enable-emacs-pdumper nil
  109.  
  110.    ;; File path pointing to emacs 27.1 executable compiled with support
  111.    ;; for the portable dumper (this is currently the branch pdumper).
  112.    ;; (default "emacs-27.0.50")
  113.    dotspacemacs-emacs-pdumper-executable-file "emacs-27.0.50"
  114.  
  115.    ;; Name of the Spacemacs dump file. This is the file will be created by the
  116.    ;; portable dumper in the cache directory under dumps sub-directory.
  117.    ;; To load it when starting Emacs add the parameter `--dump-file'
  118.    ;; when invoking Emacs 27.1 executable on the command line, for instance:
  119.    ;;   ./emacs --dump-file=~/.emacs.d/.cache/dumps/spacemacs.pdmp
  120.    ;; (default spacemacs.pdmp)
  121.    dotspacemacs-emacs-dumper-dump-file "spacemacs.pdmp"
  122.  
  123.    ;; If non-nil ELPA repositories are contacted via HTTPS whenever it's
  124.    ;; possible. Set it to nil if you have no way to use HTTPS in your
  125.    ;; environment, otherwise it is strongly recommended to let it set to t.
  126.    ;; This variable has no effect if Emacs is launched with the parameter
  127.    ;; `--insecure' which forces the value of this variable to nil.
  128.    ;; (default t)
  129.    dotspacemacs-elpa-https t
  130.  
  131.    ;; Maximum allowed time in seconds to contact an ELPA repository.
  132.    ;; (default 5)
  133.    dotspacemacs-elpa-timeout 5
  134.  
  135.    ;; Set `gc-cons-threshold' and `gc-cons-percentage' when startup finishes.
  136.    ;; This is an advanced option and should not be changed unless you suspect
  137.    ;; performance issues due to garbage collection operations.
  138.    ;; (default '(100000000 0.1))
  139.    dotspacemacs-gc-cons '(100000000 0.1)
  140.  
  141.    ;; If non-nil then Spacelpa repository is the primary source to install
  142.    ;; a locked version of packages. If nil then Spacemacs will install the
  143.    ;; latest version of packages from MELPA. (default nil)
  144.    dotspacemacs-use-spacelpa nil
  145.  
  146.    ;; If non-nil then verify the signature for downloaded Spacelpa archives.
  147.    ;; (default nil)
  148.    dotspacemacs-verify-spacelpa-archives nil
  149.  
  150.    ;; If non-nil then spacemacs will check for updates at startup
  151.    ;; when the current branch is not `develop'. Note that checking for
  152.    ;; new versions works via git commands, thus it calls GitHub services
  153.    ;; whenever you start Emacs. (default nil)
  154.    dotspacemacs-check-for-update nil
  155.  
  156.    ;; If non-nil, a form that evaluates to a package directory. For example, to
  157.    ;; use different package directories for different Emacs versions, set this
  158.    ;; to `emacs-version'. (default 'emacs-version)
  159.    dotspacemacs-elpa-subdirectory 'emacs-version
  160.  
  161.    ;; One of `vim', `emacs' or `hybrid'.
  162.    ;; `hybrid' is like `vim' except that `insert state' is replaced by the
  163.    ;; `hybrid state' with `emacs' key bindings. The value can also be a list
  164.    ;; with `:variables' keyword (similar to layers). Check the editing styles
  165.    ;; section of the documentation for details on available variables.
  166.    ;; (default 'vim)
  167.    dotspacemacs-editing-style 'vim
  168.  
  169.    ;; If non-nil output loading progress in `*Messages*' buffer. (default nil)
  170.    dotspacemacs-verbose-loading nil
  171.  
  172.    ;; Specify the startup banner. Default value is `official', it displays
  173.    ;; the official spacemacs logo. An integer value is the index of text
  174.    ;; banner, `random' chooses a random text banner in `core/banners'
  175.    ;; directory. A string value must be a path to an image format supported
  176.    ;; by your Emacs build.
  177.    ;; If the value is nil then no banner is displayed. (default 'official)
  178.    dotspacemacs-startup-banner 'official
  179.  
  180.    ;; List of items to show in startup buffer or an association list of
  181.    ;; the form `(list-type . list-size)`. If nil then it is disabled.
  182.    ;; Possible values for list-type are:
  183.    ;; `recents' `bookmarks' `projects' `agenda' `todos'.
  184.    ;; List sizes may be nil, in which case
  185.    ;; `spacemacs-buffer-startup-lists-length' takes effect.
  186.    dotspacemacs-startup-lists '((recents . 5)
  187.                                 (projects . 7))
  188.  
  189.    ;; True if the home buffer should respond to resize events. (default t)
  190.    dotspacemacs-startup-buffer-responsive t
  191.  
  192.    ;; Default major mode of the scratch buffer (default `text-mode')
  193.    dotspacemacs-scratch-mode 'text-mode
  194.  
  195.    ;; Initial message in the scratch buffer, such as "Welcome to Spacemacs!"
  196.    ;; (default nil)
  197.    dotspacemacs-initial-scratch-message nil
  198.  
  199.    ;; List of themes, the first of the list is loaded when spacemacs starts.
  200.    ;; Press `SPC T n' to cycle to the next theme in the list (works great
  201.    ;; with 2 themes variants, one dark and one light)
  202.    dotspacemacs-themes '(doom-tomorrow-night
  203.                          spacemacs-dark)
  204.  
  205.    ;; Set the theme for the Spaceline. Supported themes are `spacemacs',
  206.    ;; `all-the-icons', `custom', `vim-powerline' and `vanilla'. The first three
  207.    ;; are spaceline themes. `vanilla' is default Emacs mode-line. `custom' is a
  208.    ;; user defined themes, refer to the DOCUMENTATION.org for more info on how
  209.    ;; to create your own spaceline theme. Value can be a symbol or list with\
  210.    ;; additional properties.
  211.    ;; (default '(spacemacs :separator wave :separator-scale 1.5))
  212.    dotspacemacs-mode-line-theme '(spacemacs :separator wave :separator-scale 1.5)
  213.  
  214.    ;; If non-nil the cursor color matches the state color in GUI Emacs.
  215.    ;; (default t)
  216.    dotspacemacs-colorize-cursor-according-to-state t
  217.  
  218.    ;; Default font, or prioritized list of fonts. `powerline-scale' allows to
  219.    ;; quickly tweak the mode-line size to make separators look not too crappy.
  220.    dotspacemacs-default-font '("Source Code Pro"
  221.                                :size 13
  222.                                :weight normal
  223.                                :width normal)
  224.  
  225.    ;; The leader key (default "SPC")
  226.    dotspacemacs-leader-key "SPC"
  227.  
  228.    ;; The key used for Emacs commands `M-x' (after pressing on the leader key).
  229.    ;; (default "SPC")
  230.    dotspacemacs-emacs-command-key "SPC"
  231.  
  232.    ;; The key used for Vim Ex commands (default ":")
  233.    dotspacemacs-ex-command-key ":"
  234.  
  235.    ;; The leader key accessible in `emacs state' and `insert state'
  236.    ;; (default "M-m")
  237.    dotspacemacs-emacs-leader-key "M-m"
  238.  
  239.    ;; Major mode leader key is a shortcut key which is the equivalent of
  240.    ;; pressing `<leader> m`. Set it to `nil` to disable it. (default ",")
  241.    dotspacemacs-major-mode-leader-key ","
  242.  
  243.    ;; Major mode leader key accessible in `emacs state' and `insert state'.
  244.    ;; (default "C-M-m")
  245.    dotspacemacs-major-mode-emacs-leader-key "C-M-m"
  246.  
  247.    ;; These variables control whether separate commands are bound in the GUI to
  248.    ;; the key pairs `C-i', `TAB' and `C-m', `RET'.
  249.    ;; Setting it to a non-nil value, allows for separate commands under `C-i'
  250.    ;; and TAB or `C-m' and `RET'.
  251.    ;; In the terminal, these pairs are generally indistinguishable, so this only
  252.    ;; works in the GUI. (default nil)
  253.    dotspacemacs-distinguish-gui-tab nil
  254.  
  255.    ;; If non-nil `Y' is remapped to `y$' in Evil states. (default nil)
  256.    dotspacemacs-remap-Y-to-y$ nil
  257.  
  258.    ;; If non-nil, the shift mappings `<' and `>' retain visual state if used
  259.    ;; there. (default t)
  260.    dotspacemacs-retain-visual-state-on-shift t
  261.  
  262.    ;; If non-nil, `J' and `K' move lines up and down when in visual mode.
  263.    ;; (default nil)
  264.    dotspacemacs-visual-line-move-text nil
  265.  
  266.    ;; If non-nil, inverse the meaning of `g' in `:substitute' Evil ex-command.
  267.    ;; (default nil)
  268.    dotspacemacs-ex-substitute-global nil
  269.  
  270.    ;; Name of the default layout (default "Default")
  271.    dotspacemacs-default-layout-name "Default"
  272.  
  273.    ;; If non-nil the default layout name is displayed in the mode-line.
  274.    ;; (default nil)
  275.    dotspacemacs-display-default-layout nil
  276.  
  277.    ;; If non-nil then the last auto saved layouts are resumed automatically upon
  278.    ;; start. (default nil)
  279.    dotspacemacs-auto-resume-layouts nil
  280.  
  281.    ;; If non-nil, auto-generate layout name when creating new layouts. Only has
  282.    ;; effect when using the "jump to layout by number" commands. (default nil)
  283.    dotspacemacs-auto-generate-layout-names nil
  284.  
  285.    ;; Size (in MB) above which spacemacs will prompt to open the large file
  286.    ;; literally to avoid performance issues. Opening a file literally means that
  287.    ;; no major mode or minor modes are active. (default is 1)
  288.    dotspacemacs-large-file-size 1
  289.  
  290.    ;; Location where to auto-save files. Possible values are `original' to
  291.    ;; auto-save the file in-place, `cache' to auto-save the file to another
  292.    ;; file stored in the cache directory and `nil' to disable auto-saving.
  293.    ;; (default 'cache)
  294.    dotspacemacs-auto-save-file-location 'cache
  295.  
  296.    ;; Maximum number of rollback slots to keep in the cache. (default 5)
  297.    dotspacemacs-max-rollback-slots 5
  298.  
  299.    ;; If non-nil, `helm' will try to minimize the space it uses. (default nil)
  300.    dotspacemacs-helm-resize nil
  301.  
  302.    ;; if non-nil, the helm header is hidden when there is only one source.
  303.    ;; (default nil)
  304.    dotspacemacs-helm-no-header nil
  305.  
  306.    ;; define the position to display `helm', options are `bottom', `top',
  307.    ;; `left', or `right'. (default 'bottom)
  308.    dotspacemacs-helm-position 'bottom
  309.  
  310.    ;; Controls fuzzy matching in helm. If set to `always', force fuzzy matching
  311.    ;; in all non-asynchronous sources. If set to `source', preserve individual
  312.    ;; source settings. Else, disable fuzzy matching in all sources.
  313.    ;; (default 'always)
  314.    dotspacemacs-helm-use-fuzzy 'always
  315.  
  316.    ;; If non-nil, the paste transient-state is enabled. While enabled, pressing
  317.    ;; `p' several times cycles through the elements in the `kill-ring'.
  318.    ;; (default nil)
  319.    dotspacemacs-enable-paste-transient-state nil
  320.  
  321.    ;; Which-key delay in seconds. The which-key buffer is the popup listing
  322.    ;; the commands bound to the current keystroke sequence. (default 0.4)
  323.    dotspacemacs-which-key-delay 0.4
  324.  
  325.    ;; Which-key frame position. Possible values are `right', `bottom' and
  326.    ;; `right-then-bottom'. right-then-bottom tries to display the frame to the
  327.    ;; right; if there is insufficient space it displays it at the bottom.
  328.    ;; (default 'bottom)
  329.    dotspacemacs-which-key-position 'bottom
  330.  
  331.    ;; Control where `switch-to-buffer' displays the buffer. If nil,
  332.    ;; `switch-to-buffer' displays the buffer in the current window even if
  333.    ;; another same-purpose window is available. If non-nil, `switch-to-buffer'
  334.    ;; displays the buffer in a same-purpose window even if the buffer can be
  335.    ;; displayed in the current window. (default nil)
  336.    dotspacemacs-switch-to-buffer-prefers-purpose nil
  337.  
  338.    ;; If non-nil a progress bar is displayed when spacemacs is loading. This
  339.    ;; may increase the boot time on some systems and emacs builds, set it to
  340.    ;; nil to boost the loading time. (default t)
  341.    dotspacemacs-loading-progress-bar t
  342.  
  343.    ;; If non-nil the frame is fullscreen when Emacs starts up. (default nil)
  344.    ;; (Emacs 24.4+ only)
  345.    dotspacemacs-fullscreen-at-startup nil
  346.  
  347.    ;; If non-nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
  348.    ;; Use to disable fullscreen animations in OSX. (default nil)
  349.    dotspacemacs-fullscreen-use-non-native nil
  350.  
  351.    ;; If non-nil the frame is maximized when Emacs starts up.
  352.    ;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil.
  353.    ;; (default nil) (Emacs 24.4+ only)
  354.    dotspacemacs-maximized-at-startup nil
  355.  
  356.    ;; A value from the range (0..100), in increasing opacity, which describes
  357.    ;; the transparency level of a frame when it's active or selected.
  358.    ;; Transparency can be toggled through `toggle-transparency'. (default 90)
  359.    dotspacemacs-active-transparency 90
  360.  
  361.    ;; A value from the range (0..100), in increasing opacity, which describes
  362.    ;; the transparency level of a frame when it's inactive or deselected.
  363.    ;; Transparency can be toggled through `toggle-transparency'. (default 90)
  364.    dotspacemacs-inactive-transparency 90
  365.  
  366.    ;; If non-nil show the titles of transient states. (default t)
  367.    dotspacemacs-show-transient-state-title t
  368.  
  369.    ;; If non-nil show the color guide hint for transient state keys. (default t)
  370.    dotspacemacs-show-transient-state-color-guide t
  371.  
  372.    ;; If non-nil unicode symbols are displayed in the mode line. (default t)
  373.    dotspacemacs-mode-line-unicode-symbols t
  374.  
  375.    ;; If non-nil smooth scrolling (native-scrolling) is enabled. Smooth
  376.    ;; scrolling overrides the default behavior of Emacs which recenters point
  377.    ;; when it reaches the top or bottom of the screen. (default t)
  378.    dotspacemacs-smooth-scrolling t
  379.  
  380.    ;; Control line numbers activation.
  381.    ;; If set to `t' or `relative' line numbers are turned on in all `prog-mode' and
  382.    ;; `text-mode' derivatives. If set to `relative', line numbers are relative.
  383.    ;; This variable can also be set to a property list for finer control:
  384.    ;; '(:relative nil
  385.    ;;   :disabled-for-modes dired-mode
  386.    ;;                       doc-view-mode
  387.    ;;                       markdown-mode
  388.    ;;                       org-mode
  389.    ;;                       pdf-view-mode
  390.    ;;                       text-mode
  391.    ;;   :size-limit-kb 1000)
  392.    ;; (default nil)
  393.    dotspacemacs-line-numbers nil
  394.  
  395.    ;; Code folding method. Possible values are `evil' and `origami'.
  396.    ;; (default 'evil)
  397.    dotspacemacs-folding-method 'evil
  398.  
  399.    ;; If non-nil `smartparens-strict-mode' will be enabled in programming modes.
  400.    ;; (default nil)
  401.    dotspacemacs-smartparens-strict-mode nil
  402.  
  403.    ;; If non-nil pressing the closing parenthesis `)' key in insert mode passes
  404.    ;; over any automatically added closing parenthesis, bracket, quote, etc…
  405.    ;; This can be temporary disabled by pressing `C-q' before `)'. (default nil)
  406.    dotspacemacs-smart-closing-parenthesis nil
  407.  
  408.    ;; Select a scope to highlight delimiters. Possible values are `any',
  409.    ;; `current', `all' or `nil'. Default is `all' (highlight any scope and
  410.    ;; emphasis the current one). (default 'all)
  411.    dotspacemacs-highlight-delimiters 'all
  412.  
  413.    ;; If non-nil, start an Emacs server if one is not already running.
  414.    ;; (default nil)
  415.    dotspacemacs-enable-server nil
  416.  
  417.    ;; If non-nil, advise quit functions to keep server open when quitting.
  418.    ;; (default nil)
  419.    dotspacemacs-persistent-server nil
  420.  
  421.    ;; List of search tool executable names. Spacemacs uses the first installed
  422.    ;; tool of the list. Supported tools are `rg', `ag', `pt', `ack' and `grep'.
  423.    ;; (default '("rg" "ag" "pt" "ack" "grep"))
  424.    dotspacemacs-search-tools '("rg" "ag" "pt" "ack" "grep")
  425.  
  426.    ;; Format specification for setting the frame title.
  427.    ;; %a - the `abbreviated-file-name', or `buffer-name'
  428.    ;; %t - `projectile-project-name'
  429.    ;; %I - `invocation-name'
  430.    ;; %S - `system-name'
  431.    ;; %U - contents of $USER
  432.    ;; %b - buffer name
  433.    ;; %f - visited file name
  434.    ;; %F - frame name
  435.    ;; %s - process status
  436.    ;; %p - percent of buffer above top of window, or Top, Bot or All
  437.    ;; %P - percent of buffer above bottom of window, perhaps plus Top, or Bot or All
  438.    ;; %m - mode name
  439.    ;; %n - Narrow if appropriate
  440.    ;; %z - mnemonics of buffer, terminal, and keyboard coding systems
  441.    ;; %Z - like %z, but including the end-of-line format
  442.    ;; (default "%I@%S")
  443.    dotspacemacs-frame-title-format "%I@%S"
  444.  
  445.    ;; Format specification for setting the icon title format
  446.    ;; (default nil - same as frame-title-format)
  447.    dotspacemacs-icon-title-format nil
  448.  
  449.    ;; Delete whitespace while saving buffer. Possible values are `all'
  450.    ;; to aggressively delete empty line and long sequences of whitespace,
  451.    ;; `trailing' to delete only the whitespace at end of lines, `changed' to
  452.    ;; delete only whitespace for changed lines or `nil' to disable cleanup.
  453.    ;; (default nil)
  454.    dotspacemacs-whitespace-cleanup nil
  455.  
  456.    ;; Either nil or a number of seconds. If non-nil zone out after the specified
  457.    ;; number of seconds. (default nil)
  458.    dotspacemacs-zone-out-when-idle nil
  459.  
  460.    ;; Run `spacemacs/prettify-org-buffer' when
  461.    ;; visiting README.org files of Spacemacs.
  462.    ;; (default nil)
  463.    dotspacemacs-pretty-docs nil))
  464.  
  465. (defun dotspacemacs/user-init ()
  466.   "Initialization for user code:
  467. This function is called immediately after `dotspacemacs/init', before layer
  468. configuration.
  469. It is mostly for variables that should be set before packages are loaded.
  470. If you are unsure, try setting them in `dotspacemacs/user-config' first."
  471.   )
  472.  
  473. (defun dotspacemacs/user-load ()
  474.   "Library to load while dumping.
  475. This function is called while dumping Spacemacs configuration. You can
  476. `require' or `load' the libraries of your choice that will be included
  477. in the dump."
  478.   )
  479.  
  480. (defun dotspacemacs/user-config ()
  481.   "Configuration for user code:
  482. This function is called at the very end of Spacemacs startup, after layer
  483. configuration.
  484. Put your configuration code here, except for variables that should be set
  485. before packages are loaded."
  486.  
  487.   ;; enable rainbow mode for all identifiers
  488.   ;; (add-hook 'after-init-hook 'global-color-identifiers-mode)
  489.  
  490.  
  491.   (global-company-mode)
  492.   (custom-set-faces
  493.    '(company-tooltip-common
  494.      ((t (:inherit company-tooltip :weight bold :underline nil))))
  495.    '(company-tooltip-common-selection
  496.      ((t (:inherit company-tooltip-selection :weight bold :underline nil)))))
  497.   ;;(add-to-list 'company-backends 'company-lsp-async)
  498.   ;; (setq company-backends 'company-lsp-async)
  499.   (setq company-transformers nil company-lsp-async t company-lsp-cache-candidates nil)
  500.  
  501.   ;; (setq cquery-sem-highlight-method 'font-lock)
  502.   (setq cquery-sem-highlight-method 'overlay) ;; alternatively, probably performance problems but more accurate
  503.  
  504.   (require 'cquery-semantic-highlighting)
  505.   ;; For rainbow semantic highlighting
  506.   (cquery-use-default-rainbow-sem-highlight)
  507.  
  508.   (with-eval-after-load 'lsp-mode
  509.     (setq lsp-rust-rls-command '("rustup" "run" "nightly" "rls"))
  510.     (require 'lsp-rust))
  511.   (add-hook 'rust-mode-hook #'lsp-rust-enable)
  512.   (add-hook 'rust-mode-hook #'flycheck-mode)
  513.  
  514.   ;; treat files in subprojects as part of the whole project
  515.   ;; (with-eval-after-load 'projectile
  516.   ;;   (setq projectile-project-root-files-top-down-recurring
  517.   ;;         (append '("compile_commands.json"
  518.   ;;                   ".cquery")
  519.   ;;                 projectile-project-root-files-top-down-recurring)))
  520.  
  521.   (defun cquery//enable ()
  522.     (condition-case nil
  523.         (lsp-cquery-enable)
  524.       (user-error nil)))
  525.  
  526.   (use-package cquery
  527.     :commands lsp-cquery-enable
  528.     :init (add-hook 'c-mode-common-hook #'cquery//enable))
  529.  
  530.   ;; Also see lsp-project-whitelist lsp-project-blacklist cquery-root-matchers
  531.   )
  532.  
  533. ;; Do not write anything past this comment. This is where Emacs will
  534. ;; auto-generate custom variable definitions.
  535. (defun dotspacemacs/emacs-custom-settings ()
  536.   "Emacs custom settings.
  537. This is an auto-generated function, do not modify its content directly, use
  538. Emacs customize menu instead.
  539. This function is called at the very end of Spacemacs initialization."
  540. (custom-set-variables
  541.  ;; custom-set-variables was added by Custom.
  542.  ;; If you edit it by hand, you could mess it up, so be careful.
  543.  ;; Your init file should contain only one such instance.
  544.  ;; If there is more than one, they won't work right.
  545.  '(package-selected-packages
  546.    (quote
  547.     (color-identifiers-mode zenburn-theme zen-and-art-theme yasnippet-snippets yapfify xterm-color ws-butler winum white-sand-theme which-key volatile-highlights vi-tilde-fringe uuidgen use-package unfill underwater-theme ujelly-theme twilight-theme twilight-bright-theme twilight-anti-bright-theme toxi-theme toc-org tao-theme tangotango-theme tango-plus-theme tango-2-theme symon sunny-day-theme sublime-themes subatomic256-theme subatomic-theme string-inflection spaceline-all-the-icons spacegray-theme soothe-theme solarized-theme soft-stone-theme soft-morning-theme soft-charcoal-theme smyx-theme smeargle shell-pop seti-theme reverse-theme restart-emacs rebecca-theme rainbow-delimiters railscasts-theme pyvenv pytest pyenv-mode py-isort purple-haze-theme professional-theme popwin planet-theme pippel pipenv pip-requirements phoenix-dark-pink-theme phoenix-dark-mono-theme persp-mode pcre2el password-generator paradox overseer orgit organic-green-theme org-projectile org-present org-pomodoro org-mime org-download org-bullets org-brain open-junk-file omtose-phellack-theme oldlace-theme occidental-theme obsidian-theme noctilux-theme neotree naquadah-theme nameless mwim mustang-theme multi-term move-text monokai-theme monochrome-theme molokai-theme moe-theme mmm-mode minimal-theme material-theme markdown-toc majapahit-theme magit-svn magit-gitflow madhat2r-theme macrostep lush-theme lsp-ui lsp-rust lsp-python lorem-ipsum live-py-mode link-hint light-soap-theme kaolin-themes jbeans-theme jazz-theme ir-black-theme inkpot-theme indent-guide importmagic hungry-delete htmlize hl-todo highlight-parentheses highlight-numbers highlight-indentation heroku-theme hemisu-theme helm-xref helm-themes helm-swoop helm-pydoc helm-purpose helm-projectile helm-mode-manager helm-make helm-gitignore helm-flx helm-descbinds helm-company helm-c-yasnippet helm-ag hc-zenburn-theme gruvbox-theme gruber-darker-theme grandshell-theme gotham-theme google-translate golden-ratio gnuplot gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link git-gutter-fringe git-gutter-fringe+ gh-md gandalf-theme fuzzy font-lock+ flycheck-pos-tip flx-ido flatui-theme flatland-theme fill-column-indicator farmhouse-theme fancy-battery eziam-theme eyebrowse expand-region exotica-theme exec-path-from-shell evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-snipe evil-search-highlight-persist evil-org evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-magit evil-lisp-state evil-lion evil-indent-plus evil-iedit-state evil-goggles evil-exchange evil-escape evil-ediff evil-cleverparens evil-args evil-anzu eval-sexp-fu espresso-theme eshell-z eshell-prompt-extras esh-help elisp-slime-nav editorconfig dumb-jump dracula-theme doom-themes django-theme diminish diff-hl define-word darktooth-theme darkokai-theme darkmine-theme darkburn-theme dakrone-theme cython-mode cyberpunk-theme cquery counsel-projectile company-statistics company-quickhelp company-lsp company-anaconda column-enforce-mode color-theme-sanityinc-tomorrow color-theme-sanityinc-solarized clues-theme clean-aindent-mode cherry-blossom-theme centered-cursor-mode busybee-theme bubbleberry-theme browse-at-remote birds-of-paradise-plus-theme badwolf-theme auto-yasnippet auto-highlight-symbol auto-compile apropospriate-theme anti-zenburn-theme ample-zen-theme ample-theme alect-themes aggressive-indent afternoon-theme ace-window ace-link ace-jump-helm-line ac-ispell))))
  548. (custom-set-faces
  549.  ;; custom-set-faces was added by Custom.
  550.  ;; If you edit it by hand, you could mess it up, so be careful.
  551.  ;; Your init file should contain only one such instance.
  552.  ;; If there is more than one, they won't work right.
  553.  )
  554. )
Add Comment
Please, Sign In to add comment