2015-03-22 06:23:12 +00:00
|
|
|
;;; funcs.el --- Company Layer functions File
|
|
|
|
;;
|
|
|
|
;; Copyright (c) 2012-2014 Sylvain Benner
|
|
|
|
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
|
|
|
|
;;
|
|
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
|
|
|
;;; License: GPLv3
|
2014-11-07 21:41:23 +00:00
|
|
|
|
2015-03-22 06:23:12 +00:00
|
|
|
(defun spacemacs/company-backend-with-yas (backend)
|
|
|
|
"Return BACKEND with support for yasnippet candidates."
|
2015-03-23 04:48:06 +00:00
|
|
|
backend
|
|
|
|
;; ------------------
|
|
|
|
;; syl20bnr: For now adding company-snippet to some backend like anaconda
|
|
|
|
;; has weird side effects, I need to investigate a little more on this
|
|
|
|
;; ------------------
|
|
|
|
;; (if (and (configuration-layer/package-declaredp 'yasnippet)
|
|
|
|
;; company-mode-enable-yas
|
|
|
|
;; (not (eq 'company-semantic backend)))
|
|
|
|
;; (unless (and (listp backend) (member 'company-yasnippet backend))
|
|
|
|
;; (append (if (listp backend) backend (list backend))
|
|
|
|
;; (list :with 'company-yasnippet)))
|
|
|
|
;; ;; (cons backend '(company-yasnippet)))
|
|
|
|
;; backend)
|
|
|
|
)
|
2014-11-07 21:41:23 +00:00
|
|
|
|