nvim: Nicer conform error if formatter is not available
This commit is contained in:
parent
172f9b72f3
commit
33ee643e78
1 changed files with 4 additions and 2 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue