diff options
-rw-r--r-- | fnl/plugins/editor/conform.fnl | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/fnl/plugins/editor/conform.fnl b/fnl/plugins/editor/conform.fnl index ed5322f..973d1c4 100644 --- a/fnl/plugins/editor/conform.fnl +++ b/fnl/plugins/editor/conform.fnl @@ -7,26 +7,24 @@ (conform.format {:lsp_fallback true :async true}))) {:desc :Format})) -(fn config [] - (let [conform (require :conform)] - (conform.setup {:formatters {:fnlfmt {:command :fnlfmt - :args [:--fix :$FILENAME] - :stdin false}} - :formatters_by_ft {:* [:codespell] - :_ [:trim_whitespace :trim_newlines] - :css [:stylelint] - :fennel [:fnlfmt] - :haskell [:fourmolu] - :html [:djlint] - :json [:jq] - :lua [:stylua] - :markdown [:prettierd] - :ocaml [:ocamlformat] - :python [:ruff_format] - :rust [:rustfmt] - :sh [:shfmt :shellharden] - :sql [:pg_format :sqlfluff] - :toml [:taplo] - :yaml [:yamlfmt]}}))) +(local opts {:formatters {:fnlfmt {:command :fnlfmt + :args [:--fix :$FILENAME] + :stdin false}} + :formatters_by_ft {:* [:codespell] + :_ [:trim_whitespace :trim_newlines] + :css [:stylelint] + :fennel [:fnlfmt] + :haskell [:fourmolu] + :html [:djlint] + :json [:jq] + :lua [:stylua] + :markdown [:prettierd] + :ocaml [:ocamlformat] + :python [:ruff_format] + :rust [:rustfmt] + :sh [:shfmt :shellharden] + :sql [:pg_format :sqlfluff] + :toml [:taplo] + :yaml [:yamlfmt]}}) -{1 :stevearc/conform.nvim : init : config :event [:BufReadPost :BufNewFile]} +{1 :stevearc/conform.nvim : init : opts :event [:BufReadPost :BufNewFile]} |