feat(format): add :lang fortran formatter

This commit is contained in:
Ellis Kenyő 2022-08-16 08:28:14 +01:00 committed by Ellis Kenyo
parent 12c901cf28
commit efd5ee00ea
No known key found for this signature in database
GPG key ID: 298BE5D997EBAA02
2 changed files with 7 additions and 2 deletions

View file

@ -35,6 +35,9 @@
:desc "build" "b" #'+fortran/build :desc "build" "b" #'+fortran/build
:desc "run" "r" #'+fortran/run) :desc "run" "r" #'+fortran/run)
(when (executable-find "fprettify")
(set-formatter! 'fprettify '("fprettify" "-") :modes '(f90-mode fortran-mode)))
(when (modulep! +intel) (when (modulep! +intel)
(map! :map f90-mode-map (map! :map f90-mode-map
:localleader :localleader

View file

@ -18,6 +18,8 @@
(when (modulep! +lsp) (when (modulep! +lsp)
(unless (executable-find "fortls") (unless (executable-find "fortls")
(warn! "Couldn't find fortls.")) (warn! "Couldn't find fortls. Language features will be disabled.")))
(when (modulep! :editor format)
(unless (executable-find "fprettify") (unless (executable-find "fprettify")
(warn! "Couldn't find fprettify."))) (warn! "Couldn't find fprettify. Formatting will be disabled.")))