feat: set up conform

This commit is contained in:
Fey Naomi Schrewe 2024-09-12 10:03:38 +02:00
parent febb0d07bd
commit 33520be599

View File

@ -203,21 +203,31 @@ return {
}
},
{
'stevearc/conform.nvim',
"stevearc/conform.nvim",
config = function()
require('conform').setup({
require("conform").setup({
formatters_by_ft = {
lua = { 'stylua' },
rust = { 'rustfmt', lsp_format = 'fallback' },
-- javascript = { '', stop_after_first = true },
lua = { "stylua" },
rust = { "rustfmt", lsp_format = "fallback" },
javascript = { "eslint_d", stop_after_first = true, lsp_format = "never" },
typescript = { "eslint_d", stop_after_first = true, lsp_format = "never" },
},
format_on_save = {},
})
end,
keys = {
{
"<leader>ff",
function()
require("conform").format({ async = true })
end,
desc = "Format buffer",
},
},
enabled = hasversion(0, 10),
event = 'VeryLazy'
event = "VeryLazy",
},
{
'folke/trouble.nvim',
opts = {},
cmd = 'Trouble',
keys = {