From 3983fba5b5d9ed0b707cfa49dcab2038d5b2aed2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 20 Sep 2023 21:01:55 +0200 Subject: [PATCH] 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. --- modules/lang/zig/config.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/lang/zig/config.el b/modules/lang/zig/config.el index a9f21522f42..ae69af00cfe 100644 --- a/modules/lang/zig/config.el +++ b/modules/lang/zig/config.el @@ -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