feat: add csharp formatting
This commit is contained in:
@@ -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 })
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user