add all previous plugins and config

This commit is contained in:
Thomas Ruoff
2023-03-06 23:14:37 +01:00
parent fdfa4e4128
commit 5d3c071e8a
10 changed files with 382 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
return {
"mhartington/formatter.nvim",
lazy = false,
init = function()
vim.api.nvim_create_augroup('_formatter', { clear = true });
vim.api.nvim_create_autocmd('BufWritePost', {
command = 'FormatWrite',
group = '_formatter',
})
end,
opts = function()
local filetypes = require('formatter.filetypes')
return {
logging = false,
log_level = vim.log.levels.WARN,
filetype = {
lua = {
filetypes.lua.stylua,
},
javascript = {
filetypes.javascript.eslint_d,
},
javascriptreact = {
filetypes.javascript.eslint_d,
},
json = {
filetypes.json.prettierd,
},
rust = {
filetypes.rust.rustfmt,
},
['*'] = {
filetypes.any.remove_trailing_whitespace,
},
},
}
end
}