perf(zig): quote flycheck-define-checker

Eager expansion of the flycheck-define-checker macro causes flycheck to
be unavoidably eager-loaded at startup, regardless of other deferral
techniques, slowing down startup considerably, as it pulls in a number
of associated packages/config with it.
This commit is contained in:
Henrik Lissner 2023-09-20 21:01:55 +02:00
parent 96aed4bf35
commit 3983fba5b5
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -21,12 +21,13 @@
(when (and (modulep! :checkers syntax)
(not (modulep! :checkers syntax +flymake)))
(flycheck-define-checker zig
"A zig syntax checker using zig's `ast-check` command."
:command ("zig" "ast-check" (eval (buffer-file-name)))
:error-patterns
((error line-start (file-name) ":" line ":" column ": error: " (message) line-end))
:modes zig-mode)
(eval '(flycheck-define-checker zig
"A zig syntax checker using zig's `ast-check` command."
:command ("zig" "ast-check" (eval (buffer-file-name)))
:error-patterns
((error line-start (file-name) ":" line ":" column ": error: " (message) line-end))
:modes zig-mode)
t)
(add-to-list 'flycheck-checkers 'zig))
(map! :localleader