feat: add csharp formatting

This commit is contained in:
2026-06-28 13:50:26 +02:00
parent ca49391504
commit 9b0c8b35ee
2 changed files with 23 additions and 0 deletions
+4
View File
@@ -1,3 +1,7 @@
vim.opt_local.expandtab = true
vim.opt_local.shiftwidth = 4
vim.opt_local.tabstop = 4
vim.keymap.set("n", "<leader>f", function()
require("conform").format({ async = true })
end, { buffer = true })
+19
View File
@@ -0,0 +1,19 @@
return {
"stevearc/conform.nvim",
opts = {
formatters_by_ft = {
cs = { "csharpier" },
},
formatters = {
csharpier = {
command = "csharpier",
args = { "format", "--stdin-path", "$FILENAME" },
stdin = true,
},
},
format_on_save = {
timeout_ms = 3000,
lsp_fallback = true,
},
},
}