doomemacs/modules/lang/crystal/config.el
Henrik Lissner d58d084774
tweak(:lang,:tools): start eglot/lsp-mode later
To ensure lsp/eglot settings have precedence over local servers (e.g.
cider and lookup handlers).

Ref: clojure-emacs/cider#3170
2022-03-30 17:32:47 +02:00

30 lines
756 B
EmacsLisp

;;; lang/crystal/config.el -*- lexical-binding: t; -*-
(after! crystal-mode
(set-lookup-handlers! 'crystal-mode
:definition #'crystal-def-jump
:references #'crystal-tool-imp)
(when (featurep! +lsp)
(add-hook 'crystal-mode-local-vars-hook #'lsp! 'append))
(map! :localleader
:map crystal-mode-map
:prefix "t"
"a" #'crystal-spec-all
"v" #'crystal-spec-buffer
"s" #'crystal-spec-line
"t" #'crystal-spec-switch))
(use-package! flycheck-crystal
:when (featurep! :checkers syntax)
:after crystal-mode)
(use-package! flycheck-ameba
:when (featurep! :checkers syntax)
:after crystal-mode
:config (flycheck-ameba-setup))
(use-package! inf-crystal
:commands crystal-switch-to-inf)