This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+tools/ycmd/packages.el
syl20bnr b296a93929 ymcd: simplify eldoc integration
ycmd-eldoc is not a package, it is a feature provided by ycmd package.
Use regular post-init mechanism to setup eldoc.
2017-01-05 23:13:45 -05:00

46 lines
1.3 KiB
EmacsLisp

;;; packages.el --- Ycmd Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2017 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 :toggle (configuration-layer/package-usedp 'company))
(flycheck-ycmd :toggle (configuration-layer/package-usedp 'flycheck))
eldoc
ycmd
))
(unless (boundp 'ycmd-server-command)
(message (concat "YCMD won't work unless you set the ycmd-server-command "
"variable to the path to a ycmd install.")))
(defun ycmd/init-company-ycmd ()
(use-package company-ycmd
:defer t
:commands company-ycmd))
(defun ycmd/init-flycheck-ycmd ()
(use-package flycheck-ycmd
:defer t
: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
:defer t
: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)))))