mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-19 13:43:36 -05:00
feat(format): add :lang nim formatter
This commit is contained in:
@@ -12,6 +12,8 @@ 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))
|
||||||
|
|
||||||
(when IS-WINDOWS
|
(when IS-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)
|
||||||
(defadvice! +nim--suggest-get-temp-file-name-a (path)
|
(defadvice! +nim--suggest-get-temp-file-name-a (path)
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
;; -*- lexical-binding: t; no-byte-compile: t; -*-
|
|
||||||
;;; lang/nim/doctor.el
|
;;; lang/nim/doctor.el
|
||||||
|
|
||||||
(unless (executable-find "nimsuggest")
|
(unless (executable-find "nimsuggest")
|
||||||
@@ -7,3 +7,6 @@
|
|||||||
(unless (executable-find "nim")
|
(unless (executable-find "nim")
|
||||||
(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)
|
||||||
|
(unless (executable-find "nimfmt")
|
||||||
|
(warn! "Could not find nimfmt. Formatting will be disabled.")))
|
||||||
|
Reference in New Issue
Block a user