spacemacs/layers/+tools/ycmd/packages.el

29 lines
861 B
EmacsLisp
Raw Normal View History

(setq ycmd-packages
2015-01-10 23:57:24 +00:00
'(
(company-ycmd :toggle (configuration-layer/package-usedp 'company))
(flycheck-ycmd :toggle (configuration-layer/package-usedp 'flycheck))
2015-04-01 02:24:01 +00:00
ycmd
))
2015-01-10 23:57:24 +00:00
(unless (boundp 'ycmd-server-command)
2015-04-01 02:24:01 +00:00
(message (concat "YCMD won't work unless you set the ycmd-server-command "
"variable to the path to a ycmd install.")))
2015-01-10 23:57:24 +00:00
(defun ycmd/init-company-ycmd ()
(use-package company-ycmd
:defer t
:commands company-ycmd))
2015-04-01 02:24:01 +00:00
(defun ycmd/init-flycheck-ycmd ()
(use-package flycheck-ycmd
:defer t
:init (add-hook 'ycmd-mode-hook 'flycheck-ycmd-setup)))
2015-01-10 23:57:24 +00:00
(defun ycmd/init-ycmd ()
(use-package ycmd
2015-03-16 01:43:31 +00:00
:defer t
2015-01-10 23:57:24 +00:00
:init
(unless (boundp 'ycmd-global-config)
core: refactor layer system 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`
2016-07-17 19:00:43 +00:00
(let ((dir (configuration-layer/get-layer-local-dir 'ycmd)))
(setq-default ycmd-global-config (concat dir "global_conf.py"))))))