feat(format): add :lang swift formatter
This commit is contained in:
parent
7b46177d19
commit
c2980d1d7b
2 changed files with 5 additions and 0 deletions
|
@ -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.")))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue