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
1 changed files with 10 additions and 0 deletions

View File

@ -93,14 +93,20 @@ return {
astro = { { "prettierd", "prettier" } },
bash = { "shfmt" },
bib = { "bibtex-tidy" },
css = { { "prettierd", "prettier" } },
graphql = { { "prettierd", "prettier" } },
html = { { "prettierd", "prettier" } },
javascript = { { "prettierd", "prettier" } },
javascriptreact = { { "prettierd", "prettier" } },
json = { "jq" },
lua = { "stylua" },
python = { "ruff_fix", "ruff_format" },
sh = { "shfmt" },
svelte = { { "prettierd", "prettier" } },
typescript = { { "prettierd", "prettier" } },
typescriptreact = { { "prettierd", "prettier" } },
vue = { { "prettierd", "prettier" } },
yaml = { { "prettierd", "prettier" } },
zsh = { "shfmt" },
},
formatters = {
@ -151,6 +157,10 @@ return {
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