spacemacs/layers/+tools/ycmd/packages.el
syl20bnr 29c78ce841 Defer packages by default using use-package-always-defer
Warning now `:defer t` is implied, to force a package to load `:demand t` is
now necessary.
2018-02-27 23:32:52 -05:00

40 lines
1 KiB
EmacsLisp

;;; packages.el --- Ycmd Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
;;
;; Author: Brian Hicks <brian@brianthicks.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(setq ycmd-packages
'(
(company-ycmd :requires company)
(flycheck-ycmd :requires flycheck)
eldoc
ycmd
))
(defun ycmd/init-company-ycmd ()
(use-package company-ycmd
:commands company-ycmd))
(defun ycmd/init-flycheck-ycmd ()
(use-package flycheck-ycmd
:init (add-hook 'ycmd-mode-hook 'flycheck-ycmd-setup)))
(defun ycmd/post-init-eldoc ()
(add-hook 'ycmd-mode-hook 'ycmd-eldoc-setup))
(defun ycmd/init-ycmd ()
(use-package ycmd
:init
(progn
(unless (boundp 'ycmd-global-config)
(setq-default ycmd-global-config
(concat (configuration-layer/get-layer-path 'ycmd)
"global_conf.py")))
(setq-default ycmd-parse-conditions '(save mode-enabled)))))