neovim/nvim/lua/formatter-config.lua

23 lines
417 B
Lua

local util = require("formatter.util")
require("formatter").setup({
logging = true,
log_level = vim.log.levels.WARN,
filetype = {
lua = {
require("formatter.filetypes.lua").stylua,
},
rust = {
function()
return {
exe = "rustfmt",
args = { "--edition 2021" },
stdin = true,
}
end,
},
["*"] = {
require("formatter.filetypes.any").remove_trailing_whitespace,
},
},
})