2019-01-02 21:34:56 +00:00
|
|
|
|
;;; funcs.el --- PHP Layer functions File for Spacemacs
|
|
|
|
|
;;
|
|
|
|
|
;; Copyright (c) 2012-2018 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
|
|
|
|
|
|
2019-09-30 04:49:44 +00:00
|
|
|
|
(defun spacemacs//php-backend ()
|
|
|
|
|
"Returns selected backend."
|
|
|
|
|
(if php-backend
|
|
|
|
|
php-backend
|
|
|
|
|
(cond
|
|
|
|
|
((configuration-layer/layer-used-p 'lsp) 'lsp)
|
|
|
|
|
(t nil))))
|
2019-01-02 21:34:56 +00:00
|
|
|
|
|
|
|
|
|
(defun spacemacs//php-setup-backend ()
|
|
|
|
|
"Conditionally setup php backend."
|
2019-09-30 04:49:44 +00:00
|
|
|
|
(pcase (spacemacs//php-backend)
|
2019-01-02 21:34:56 +00:00
|
|
|
|
(`lsp (spacemacs//php-setup-lsp))))
|
|
|
|
|
|
2019-09-30 04:49:44 +00:00
|
|
|
|
|
|
|
|
|
;; lsp
|
|
|
|
|
|
2019-01-02 21:34:56 +00:00
|
|
|
|
(defun spacemacs//php-setup-lsp ()
|
|
|
|
|
"Setup lsp backend."
|
|
|
|
|
(if (configuration-layer/layer-used-p 'lsp)
|
|
|
|
|
(lsp)
|
|
|
|
|
(message "`lsp' layer is not installed, please add `lsp' layer to your dotfile.")))
|