1c4f685b13
TL;DR Should get 20~25% speed improvement on startup, should get a big improvement when using ivy or helm SPC h SPC. Users with layers.el files in their layers must use `configuration-layer/declare-used-layer` instead of `configuration-layer/declare-layer` The implementation of the layer system made heavy use of `object-assoc` and `object-assoc-list` functions which are not efficient. This PR mainly replaces those object lists with hash maps in order to index the objects by their name and achieve an O(1) access time. The old object lists `configuration-layer--layers` and `configuration-layer--packages` have been each by two variables each: - `configuration-layer--indexed-layers` which is a hash-map of all the layer objects and `configuration-layer--used-layers` which is a list of all _used_ layers symbols, - symmetrically `configuration-layer--indexed-packages` which is a hash-map of all the package objects and `configuration-layer--used-packages` which is a list of all _used_ packages symbols. The hash map `configuration-layer--layer-paths` is gone, now we create directly layer objects when discovering the layers and set the :dir property. Note that previously the layer paths were the parent directory of the layer, now :dir is the layer path. The function `configuration-layer//make-layer` is now similar to its counterpart `configuration-layer//make-package` in the sense that it takes an optional `obj` to be able to override its properties. The functions `configuration-layer/declare-layer` and `configuration-layer/declare-layers` now takes an optional parameter `usedp` in order to declare used or not used layers. For convenience new functions have been added: `configuration-layer/declare-used-layer` and `configuration-layer/declare-used-layers`, users _must_ update all occurrences of `configuration-layer/declare-layer` by `configuration-layer/declare-used-layers` in their `layers.el` files. `helm-spacemacs-help` and `ivy-spacemacs-help` are updated to match the changes in `core-configuration-layer.el`. Rename some variables to make them more explicit: `configuration-layer-no-layer` -> `configuration-layer-exclude-all-layers` `configuration-layer-distribution` -> `configuration-layer-force-distribution` |
||
---|---|---|
.. | ||
global_conf.py | ||
packages.el | ||
README.org |
YCMD layer
Description
This layer adds emacs-ycmd support.
Install
Layer
To use this configuration layer, add it to your ~/.spacemacs
. You will need to
add ycmd
to the existing dotspacemacs-configuration-layers
list in this
file.
YCMD
- Install the
ycm
server. Installation instructions can be found here. -
Set the
ycmd-server-command
variable to reflect the path to the installation:(setq ycmd-server-command '("python" "/path/to/YouCompleteMe/third_party/ycmd/ycmd"))
- Instead of
.clang_complete
ycmd uses a .ycm_extra_conf.py file. -
Whitelist the file by adding the following to
.spacemacs
:;; In this example we whitelist everything in the Develop folder (setq ycmd-extra-conf-whitelist '("~/Develop/*"))
-
The completion is not going to work automatically until we actually force it:
(setq ycmd-force-semantic-completion t)
Other Requirements
This package requires the auto-completion
layer in order to get actual
completion. The syntax-checking
layer is required for flycheck support.
Configuration
By default this layer only activates ycmd for c++-mode
.
If you want ycmd support in other modes you might just want to add it for specific languages like:
(add-hook 'c++-mode-hook 'ycmd-mode)
Key Bindings
Adds SPC m g g
go to definition binding to c++-mode
as well as SPC m g G
for the more imprecise but faster version.