Initialize it globally and turn it off where needed, instead of enabling it on demand. Also fixes void-function: flycheck-mode errors when :feature syntax-checker is disabled. This is experimental. Indirectly fixes #710
20 lines
532 B
EmacsLisp
20 lines
532 B
EmacsLisp
;;; lang/crystal/config.el -*- lexical-binding: t; -*-
|
|
|
|
(def-package! crystal-mode
|
|
:defer t
|
|
:config
|
|
(set-lookup-handlers! 'crystal-mode
|
|
:definition #'crystal-def-jump
|
|
:references #'crystal-tool-imp)
|
|
(set-eval-handler! 'crystal-mode
|
|
'((:command . "crystal")
|
|
(:exec . "%c %s")
|
|
(:description . "Run Crystal script"))))
|
|
|
|
|
|
(def-package! flycheck-crystal
|
|
:when (featurep! :feature syntax-checker)
|
|
:after crystal-mode)
|
|
|
|
|
|
(def-package! inf-crystal :commands crystal-switch-to-inf)
|