feat: initial commit

- basic config according to spec
This commit is contained in:
johannes committed 2026-11-05 15:04:29 +01:00
commit 9b0446c5f6
36 files changed
+1114

No files matched your search

+51
View File
@@ -0,0 +1,51 @@
return {
{
"stevearc/conform.nvim",
cond = vim.g.profile == "full",
event = "BufWritePre",
cmd = "ConformInfo",
keys = {
{
"<leader>lf",
function()
require("conform").format({ async = true, lsp_format = "fallback" })
end,
desc = "Format buffer",
},
{
"<leader>tF",
function()
vim.b.disable_autoformat = not vim.b.disable_autoformat
vim.notify("format on save: " .. (vim.b.disable_autoformat and "off" or "on"))
end,
desc = "Toggle format on save (buffer)",
},
},
opts = {
formatters_by_ft = {
nix = { "nixfmt" },
lua = { "stylua" },
sh = { "shfmt" },
bash = { "shfmt" },
yaml = { "prettierd" },
json = { "prettierd" },
jsonc = { "prettierd" },
markdown = { "prettierd" },
rust = { "rustfmt" },
go = { "goimports", "gofumpt" },
javascript = { "prettierd" },
javascriptreact = { "prettierd" },
typescript = { "prettierd" },
typescriptreact = { "prettierd" },
python = { "ruff_format" },
php = { "php_cs_fixer" },
},
format_on_save = function(buf)
if vim.b[buf].disable_autoformat or vim.b[buf].bigfile then
return
end
return { timeout_ms = 1000, lsp_format = "fallback" }
end,
},
},
}