Initial commit

This commit is contained in:
2025-11-04 11:44:29 +01:00
commit 04a2178f3a
23 changed files with 1099 additions and 0 deletions

42
lua/plugins/conform.lua Normal file
View File

@@ -0,0 +1,42 @@
return {
"stevearc/conform.nvim",
event = { "BufWritePre" },
keys = {
{
"<leader>cf",
function()
require("conform").format({ async = true, lsp_fallback = true })
end,
desc = "Format buffer"
},
{
"<leader>cF",
function()
require("conform").format({ formatters = { "injected" } })
end,
desc = "Format injected langs"
},
},
opts = {
formatters_by_ft = {
javascript = { "prettier" },
typescript = { "prettier" },
javascriptreact = { "prettier" },
typescriptreact = { "prettier" },
css = { "prettier" },
html = { "prettier" },
json = { "prettier" },
yaml = { "prettier" },
markdown = { "prettier" },
lua = { "stylelua" },
python = { "black" },
php = { "php_cs_fixer" },
go = { "gofmt" },
rurst = { "rustfmt" },
},
format_on_save = {
timeout_ms = 500,
lsp_fallback = true
}
}
}