From 7d25ba3f6c10eba2b869a3cbe0bfd28dc4739aa9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 8 Jul 2024 13:55:21 -0400 Subject: [PATCH] fix(format): void function +format-with-lsp-maybe-h error Regression introduced in fd1941b. Amend: fd1941b95f22 --- modules/editor/format/README.org | 2 +- modules/editor/format/config.el | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/editor/format/README.org b/modules/editor/format/README.org index 1f3b32e52..63397dac9 100644 --- a/modules/editor/format/README.org +++ b/modules/editor/format/README.org @@ -176,7 +176,7 @@ enabled, and the running server supports =textDocument/formatting= or =textDocument/rangeFormatting=, it can be used instead of [[doom-package:apheleia]]'s (or Doom's) default formatters by enabling this module with its =+lsp= flag or manually activating the [[fn:+format-with-lsp-mode]] minor -mode (though it's a better idea to use [[fn:+format-with-lsp-maybe-h]] if you're +mode (though it's a better idea to use [[fn:+format-with-lsp-toggle-h]] if you're looking for a function to use with mode hooks; this function will respect pre-existing modifications to [[var:+format-with]]). diff --git a/modules/editor/format/config.el b/modules/editor/format/config.el index bef0b8737..d0658a5f1 100644 --- a/modules/editor/format/config.el +++ b/modules/editor/format/config.el @@ -37,8 +37,8 @@ This is controlled by `+format-on-save-disabled-modes'." ;; Use the formatter provided by lsp-mode and eglot, if available. (when (modulep! +lsp) - (add-hook 'eglot-managed-mode-hook #'+format-with-lsp-maybe-h) - (add-hook 'lsp-managed-mode-hook #'+format-with-lsp-maybe-h)) + (add-hook 'eglot-managed-mode-hook #'+format-with-lsp-toggle-h) + (add-hook 'lsp-managed-mode-hook #'+format-with-lsp-toggle-h)) :config (add-to-list 'doom-debug-variables '(apheleia-log-only-errors . nil))