fix(nim): swap nimfmt with nimpretty

Nim 2.x+ comes with its own formatter (nimpretty).

Close: #7578
Co-authored-by: pietrangelo <pietrangelo@users.noreply.github.com>
This commit is contained in:
Henrik Lissner 2024-03-05 02:29:18 -05:00 committed by Yann Esposito (Yogsototh)
parent e986f4769b
commit 4559a61d2c
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646
3 changed files with 5 additions and 6 deletions

View file

@ -52,8 +52,8 @@ Alternatively, nim is usually available through your OS's package manager:
- openSUSE: ~$ zypper install nim~ - openSUSE: ~$ zypper install nim~
** Formatter ** Formatter
Formatting is handled using the [[doom-module::editor format]] module via nimpretty
Formatting is handled using the [[doom-module::editor format]] module via [[https://github.com/FedericoCeratto/nimfmt#installation][nimfmt]]. (included with Nim).
* TODO Usage * TODO Usage
#+begin_quote #+begin_quote

View file

@ -12,7 +12,7 @@ nimsuggest isn't installed."
(when (and nimsuggest-path (file-executable-p nimsuggest-path)) (when (and nimsuggest-path (file-executable-p nimsuggest-path))
(nimsuggest-mode)))) (nimsuggest-mode))))
(set-formatter! 'nmfmt '("nimfmt" filepath) :modes '(nim-mode)) (set-formatter! 'nmfmt '("nimpretty" filepath) :modes '(nim-mode))
(when (featurep :system 'windows) (when (featurep :system 'windows)
;; TODO File PR/report upstream (https://github.com/nim-lang/nim-mode) ;; TODO File PR/report upstream (https://github.com/nim-lang/nim-mode)

View file

@ -1,4 +1,3 @@
;;; lang/nim/doctor.el ;;; lang/nim/doctor.el
(unless (executable-find "nimsuggest") (unless (executable-find "nimsuggest")
@ -8,5 +7,5 @@
(warn! "Could not find nim executable; build commands will be disabled.")) (warn! "Could not find nim executable; build commands will be disabled."))
(when (modulep! :editor format) (when (modulep! :editor format)
(unless (executable-find "nimfmt") (unless (executable-find "nimpretty")
(warn! "Could not find nimfmt. Formatting will be disabled."))) (warn! "Could not find nimpretty. Formatting will be disabled.")))