nvim: Add formatting expression and more filetypes

This commit is contained in:
Marty Oehme 2023-12-08 17:09:42 +01:00
parent bad6200bd2
commit 5ccf8bc1fc
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -93,14 +93,20 @@ return {
astro = { { "prettierd", "prettier" } }, astro = { { "prettierd", "prettier" } },
bash = { "shfmt" }, bash = { "shfmt" },
bib = { "bibtex-tidy" }, bib = { "bibtex-tidy" },
css = { { "prettierd", "prettier" } },
graphql = { { "prettierd", "prettier" } },
html = { { "prettierd", "prettier" } },
javascript = { { "prettierd", "prettier" } }, javascript = { { "prettierd", "prettier" } },
javascriptreact = { { "prettierd", "prettier" } }, javascriptreact = { { "prettierd", "prettier" } },
json = { "jq" }, json = { "jq" },
lua = { "stylua" }, lua = { "stylua" },
python = { "ruff_fix", "ruff_format" }, python = { "ruff_fix", "ruff_format" },
sh = { "shfmt" }, sh = { "shfmt" },
svelte = { { "prettierd", "prettier" } },
typescript = { { "prettierd", "prettier" } }, typescript = { { "prettierd", "prettier" } },
typescriptreact = { { "prettierd", "prettier" } },
vue = { { "prettierd", "prettier" } }, vue = { { "prettierd", "prettier" } },
yaml = { { "prettierd", "prettier" } },
zsh = { "shfmt" }, zsh = { "shfmt" },
}, },
formatters = { formatters = {
@ -151,6 +157,10 @@ return {
desc = "ConformInfo", desc = "ConformInfo",
}, },
}, },
init = function()
-- If you want the formatexpr, here is the place to set it
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
end,
}, },
-- completion setup -- completion setup