nvim/lua/plugins/conform.lua
Maciej Lebiest 97b8a1a802
All checks were successful
Build neovim image / build-neovim-amd64 (push) Successful in 9m11s
Build neovim image / build-neovim-arm64 (push) Successful in 10m54s
Build neovim image / update-images-manifest (push) Successful in 19s
more formatters, some cleaning
2024-12-17 20:37:16 +01:00

28 lines
871 B
Lua

return {
-- This will provide type hinting with LuaLS
---@module "conform"
---@type conform.setupOpts
opts = {
-- Define your formatters
formatters_by_ft = {
yaml = { "yamlfmt" },
markdown = { "mdformat" },
bash = { "shfmt" },
--lua = { "stylua" },
--python = { "isort", "black" },
--javascript = { "prettierd", "prettier", stop_after_first = true },
},
-- Set default options
default_format_opts = {
lsp_format = "fallback",
},
-- Set up format-on-save
--format_on_save = { timeout_ms = 500 },
-- Customize formatters
formatters = {
yamlfmt = {
prepend_args = { "-formatter", "retain_line_breaks=true,indentless_arrays=true" },
},
},
}
}