From 3bf3f0a4368fdc3579553c18cc18c775e6eb8d02 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Thu, 11 May 2023 15:01:27 +0200 Subject: [PATCH] Enable crystal with crystalline as lsp --- arch-config/.doom.d/config.el | 10 ++++++++++ arch-config/.doom.d/init.el | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/arch-config/.doom.d/config.el b/arch-config/.doom.d/config.el index 7f54c7cf..2381540c 100644 --- a/arch-config/.doom.d/config.el +++ b/arch-config/.doom.d/config.el @@ -85,3 +85,13 @@ ;; work around emacs hanging when opening any python requirements.txt file ;; see issue https://github.com/doomemacs/doomemacs/issues/5998 (advice-add #'pip-requirements-fetch-packages :override #'ignore) + +;; enable crystalline lsp for crystal-mode +(with-eval-after-load 'lsp-mode + (add-to-list 'lsp-language-id-configuration + '(crystal-mode . "crystal")) + (lsp-register-client + (make-lsp-client :new-connection (lsp-stdio-connection '("crystalline")) + :activation-fn (lsp-activate-on "crystal") + :priority '1 + :server-id 'crystalline))) diff --git a/arch-config/.doom.d/init.el b/arch-config/.doom.d/init.el index 4838a91c..d938a58a 100644 --- a/arch-config/.doom.d/init.el +++ b/arch-config/.doom.d/init.el @@ -115,7 +115,7 @@ ;;clojure ; java with a lisp ;;common-lisp ; if you've seen one lisp, you've seen them all ;;coq ; proofs-as-programs - ;(crystal +lsp) ; ruby at the speed of c + (crystal +lsp) ; ruby at the speed of c ;;csharp ; unity, .NET, and mono shenanigans ;;data ; config/data formats ;;(dart +flutter) ; paint ui and not much else