mirror of
https://github.com/kristoferssolo/SoloVim.git
synced 2025-10-21 20:10:41 +00:00
Update 2025-05-03 Update 2025-05-05 Update 2025-05-07 Update 2025-05-09 chore: use mini.nvim Update 2025-05-12 Update 2025-05-14 Update 2025-05-16 Update 2025-05-17 Update 2025-05-20 Update 2025-05-21 Update 2025-05-23 Update 2025-05-25 Update 2025-05-30
51 lines
1.2 KiB
Lua
51 lines
1.2 KiB
Lua
local js = { "biome", "biome-check" }
|
|
return {
|
|
"stevearc/conform.nvim",
|
|
event = { "BufWritePre" },
|
|
cmd = { "ConformInfo" },
|
|
keys = {
|
|
{
|
|
"<leader>f",
|
|
function()
|
|
require("conform").format({ async = true, lsp_fallback = "fallback" })
|
|
end,
|
|
mode = "",
|
|
desc = "Format buffer",
|
|
},
|
|
},
|
|
opts = {
|
|
formatters_by_ft = {
|
|
bash = { "shfmt" },
|
|
c = { "clang-format" },
|
|
cmake = { "cmake_format" },
|
|
cpp = { "clang-format" },
|
|
css = { "prettier" },
|
|
go = { "goimports", "gofmt" },
|
|
html = { "djlint", "rustywind" },
|
|
htmldjango = { "djlint", "rustywind" },
|
|
javascript = js,
|
|
javascriptreact = js,
|
|
json = { "jq" },
|
|
lua = { "stylua" },
|
|
markdown = { "cbfmt", "markdownlint", "markdown-toc" },
|
|
python = { "ruff_format", "ruff_fix", "ruff_organize_imports", "docformatter" },
|
|
rust = { "rustfmt", "leptosfmt", "yew-fmt" },
|
|
scss = { "prettier" },
|
|
sql = { "pg_format" },
|
|
toml = { "taplo" },
|
|
typescript = js,
|
|
typescriptreact = js,
|
|
typst = { "typstyle" },
|
|
vimwiki = { "cbfmt", "markdownlint", "markdown-toc" },
|
|
yaml = { "yamlfmt" },
|
|
["_"] = { "trim_whitespace" },
|
|
},
|
|
format_on_save = {
|
|
timeout_ms = 500,
|
|
lsp_format = "fallback",
|
|
},
|
|
log_level = vim.log.levels.ERROR,
|
|
notify_on_error = true,
|
|
},
|
|
}
|