mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
feat(format): add :lang swift formatter
This commit is contained in:
@ -27,6 +27,7 @@
|
||||
:after swift-mode
|
||||
:init (add-hook 'swift-mode-local-vars-hook #'lsp! 'append)
|
||||
:config
|
||||
(set-formatter! 'swiftformat '("swiftformat" "--output" "stdout"))
|
||||
(setq lsp-sourcekit-executable
|
||||
(cl-find-if #'executable-find
|
||||
(list lsp-sourcekit-executable ; 'sourcekit-lsp' by default
|
||||
|
@ -3,3 +3,7 @@
|
||||
(assert! (or (not (modulep! +tree-sitter))
|
||||
(modulep! :tools tree-sitter))
|
||||
"This module requires (:tools tree-sitter)")
|
||||
|
||||
(when (modulep! :editor format)
|
||||
(unless (executable-find "swiftformat")
|
||||
(warn! "Couldn't find swiftformat. Formatting will be disabled.")))
|
||||
|
Reference in New Issue
Block a user