diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2023-12-05 13:01:33 +0100 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2023-12-05 13:01:33 +0100 |
commit | 2edeb4557ce67ad65664a8190b690d2f330840fb (patch) | |
tree | a436168c3843d5391a57751a8bc4489284a903f2 /fnl/plugins/editor/conform.fnl | |
parent | 8482c16b90645dc5ca907943e6f4caf1823e57e8 (diff) |
Refactor conform opts
Diffstat (limited to 'fnl/plugins/editor/conform.fnl')
-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]} |