formatter updates, something for json

This commit is contained in:
Christoph J. Scherr 2024-12-02 23:25:31 +01:00
parent 1e52cce66f
commit e1abfdead2
1 changed files with 10 additions and 1 deletions

View File

@ -31,14 +31,23 @@ return {
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype], lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
} }
end, end,
default_format_opts = {
lsp_format = 'fallback',
},
formatters_by_ft = { formatters_by_ft = {
fallback = { 'prettier' },
lua = { 'stylua' }, lua = { 'stylua' },
json = { { 'jq', 'biome', 'clang-format', 'prettier' } },
rust = 'rustfmt',
c = 'clang-format',
cpp = 'clang-format',
python = 'autopep8',
-- Conform can also run multiple formatters sequentially -- Conform can also run multiple formatters sequentially
-- python = { "isort", "black" }, -- python = { "isort", "black" },
-- --
-- You can use a sub-list to tell conform to run *until* a formatter -- You can use a sub-list to tell conform to run *until* a formatter
-- is found. -- is found.
-- javascript = { { "prettierd", "prettier" } }, javascript = { { 'prettierd', 'prettier' } },
}, },
}, },
}, },