From 79429ecc562893b77be257013f8150eb51005cc1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 5 Mar 2024 02:29:18 -0500 Subject: [PATCH] fix(nim): swap nimfmt with nimpretty Nim 2.x+ comes with its own formatter (nimpretty). Close: #7578 Co-authored-by: pietrangelo --- modules/lang/nim/README.org | 4 ++-- modules/lang/nim/config.el | 2 +- modules/lang/nim/doctor.el | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/lang/nim/README.org b/modules/lang/nim/README.org index 166e0f6da..774d38a60 100644 --- a/modules/lang/nim/README.org +++ b/modules/lang/nim/README.org @@ -52,8 +52,8 @@ Alternatively, nim is usually available through your OS's package manager: - openSUSE: ~$ zypper install nim~ ** Formatter - -Formatting is handled using the [[doom-module::editor format]] module via [[https://github.com/FedericoCeratto/nimfmt#installation][nimfmt]]. +Formatting is handled using the [[doom-module::editor format]] module via nimpretty +(included with Nim). * TODO Usage #+begin_quote diff --git a/modules/lang/nim/config.el b/modules/lang/nim/config.el index ddaf986f3..231f29262 100644 --- a/modules/lang/nim/config.el +++ b/modules/lang/nim/config.el @@ -12,7 +12,7 @@ nimsuggest isn't installed." (when (and nimsuggest-path (file-executable-p nimsuggest-path)) (nimsuggest-mode)))) - (set-formatter! 'nmfmt '("nimfmt" filepath) :modes '(nim-mode)) + (set-formatter! 'nmfmt '("nimpretty" filepath) :modes '(nim-mode)) (when (featurep :system 'windows) ;; TODO File PR/report upstream (https://github.com/nim-lang/nim-mode) diff --git a/modules/lang/nim/doctor.el b/modules/lang/nim/doctor.el index 32980d7ed..f9927b6b6 100644 --- a/modules/lang/nim/doctor.el +++ b/modules/lang/nim/doctor.el @@ -1,4 +1,3 @@ - ;;; lang/nim/doctor.el (unless (executable-find "nimsuggest") @@ -8,5 +7,5 @@ (warn! "Could not find nim executable; build commands will be disabled.")) (when (modulep! :editor format) - (unless (executable-find "nimfmt") - (warn! "Could not find nimfmt. Formatting will be disabled."))) + (unless (executable-find "nimpretty") + (warn! "Could not find nimpretty. Formatting will be disabled.")))