migrated even more stuff from after to plugins

This commit is contained in:
2024-04-10 10:58:10 +02:00
parent ce68ad5dfc
commit 1864867434
19 changed files with 290 additions and 250 deletions

View File

@@ -1,25 +1,3 @@
local conform = require("conform")
conform.setup({
formatters_by_ft = {
lua = { "stylua" },
c = { "clang_format" },
cs = { "csharpier" },
javascript = { { "prettierd", "prettier" } },
rust = { "rustfmt" },
dart = { "dart_format" }
},
})
conform.setup()
conform.formatters.clang_format = {
args = { "--style", "{IndentWidth: 4, UseTab: Always, TabWidth: 4}" },
}
conform.formatters.rustfmt = {
args = { "--edition", "2021" },
}
vim.keymap.set("n", "<leader>f", function()
if not conform.format({ bufnr = vim.lsp.bufnr }) then
vim.lsp.buf.format()
end
end)