2020-10-23 16:57:47 +00:00
|
|
|
;;; funcs.el --- PureScript Layer functions File for Spacemacs
|
|
|
|
;;
|
2021-03-22 20:11:29 +00:00
|
|
|
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
|
2020-10-23 16:57:47 +00:00
|
|
|
;;
|
|
|
|
;; Author: nobv <6e6f6276@gmail.com>
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
2021-03-24 03:31:44 +00:00
|
|
|
;; This program is free software; you can redistribute it and/or modify
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
;; (at your option) any later version.
|
|
|
|
;;
|
|
|
|
;; This program is distributed in the hope that it will be useful,
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
;;
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
|
|
|
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2020-10-23 16:57:47 +00:00
|
|
|
|
2021-02-10 07:51:55 +00:00
|
|
|
(defun spacemacs//purescript-setup-backend ()
|
2020-10-23 16:57:47 +00:00
|
|
|
"Conditionally setup purescript backend."
|
2021-03-18 04:52:22 +00:00
|
|
|
(when (eq purescript-backend 'lsp)
|
|
|
|
(lsp)))
|
2020-10-23 16:57:47 +00:00
|
|
|
|
|
|
|
(defun spacemacs//purescript-setup-company ()
|
|
|
|
"Conditionally setup company based on backend."
|
2021-04-05 05:22:02 +00:00
|
|
|
(pcase purescript-backend
|
|
|
|
('lsp
|
|
|
|
(spacemacs|add-company-backends ;; Activate lsp company explicitly to activate
|
|
|
|
:backends company-capf ;; standard backends as well
|
|
|
|
:modes purescript-mode))
|
|
|
|
('psc-ide
|
|
|
|
(spacemacs|add-company-backends
|
|
|
|
:backends company-psc-ide-backend
|
|
|
|
:modes purescript-mode))))
|