clojure: refactor
- Moved backend determination to `config.el` - Replaced `pcase` form with only one-arm with `when` or `unless` form
This commit is contained in:
parent
dae0231fed
commit
4bf3501488
2 changed files with 2 additions and 11 deletions
|
@ -41,7 +41,7 @@
|
|||
(defvar clojure-enable-linters nil
|
||||
"If non-nil, enable clojure linters.")
|
||||
|
||||
(defvar clojure-backend nil
|
||||
(defvar clojure-backend (if (configuration-layer/layer-used-p 'lsp) 'lsp 'cider)
|
||||
"The backend to use for IDE features.
|
||||
Possible values are `lsp' and `cider'.
|
||||
If `nil' then 'cider` is the default backend unless `lsp' layer is used")
|
||||
|
|
|
@ -21,18 +21,9 @@
|
|||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
(defun spacemacs//clojure-backend ()
|
||||
"Return selected backend."
|
||||
(if clojure-backend
|
||||
clojure-backend
|
||||
(cond
|
||||
((configuration-layer/layer-used-p 'lsp) 'lsp)
|
||||
(t 'cider))))
|
||||
|
||||
(defun spacemacs//clojure-setup-backend ()
|
||||
"Conditionally setup clojure backend."
|
||||
(pcase (spacemacs//clojure-backend)
|
||||
(`lsp (lsp))))
|
||||
(when (eq clojure-backend 'lsp) (lsp)))
|
||||
|
||||
(defun clojure/fancify-symbols (mode)
|
||||
"Pretty symbols for Clojure's anonymous functions and sets,
|
||||
|
|
Reference in a new issue