Move conform and nvim-lint configuration

This commit is contained in:
Oliver Davies 2024-02-26 19:42:28 +00:00
parent 4efdebcb0e
commit 129a2dc990
3 changed files with 30 additions and 44 deletions

View file

@ -2,10 +2,17 @@ local conform = require "conform"
conform.setup {
formatters_by_ft = {
rst = { "rstfmt" },
bash = { "shellcheck" },
javascript = { { "prettierd", "prettier" } },
just = { "just" },
lua = { "stylua" },
nix = { { "alejandra", "nixfmt" } },
php = { { "php_cs_fixer", "phpcbf" } },
terraform = { "terraform_fmt" },
yaml = { "yamlfmt" },
},
}
conform.formatters.rstfmt = {
command = "rstfmt";
}
vim.keymap.set("n", "<leader>f", function()
conform.format { lsp_fallback = true, async = false, timeout_ms = 500 }
end)