1
0
Fork 0

nvim: Nicer conform error if formatter is not available

This commit is contained in:
Daniel Kempkens 2023-10-11 17:22:46 +02:00
parent 172f9b72f3
commit 33ee643e78
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM

View file

@ -3,7 +3,7 @@
toml (require :toml)
treefmt-config-file vim.env.TREEFMT_CONFIG_FILE
treefmt-exts []
tmp-filename "\$FILENAME"]
tmp-filename (.. "$" :FILENAME)]
(fn read-file [file]
(with-open [f (io.open file :rb)]
(f:read :*all)))
@ -24,7 +24,9 @@
:require_cwd true}
(= (vim.fn.executable fallback.command) 1)
fallback
[])))
{:command fallback.command
:available false
:available_msg "Executable not found"})))
(conform.setup {:formatters_by_ft {:css [:treefmt_or_prettier]
:elixir [:mix]