From 5ccf8bc1fca60429eb17e9100060cc010891aba1 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 8 Dec 2023 17:09:42 +0100 Subject: [PATCH] nvim: Add formatting expression and more filetypes --- nvim/.config/nvim/lua/plugins/ide.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nvim/.config/nvim/lua/plugins/ide.lua b/nvim/.config/nvim/lua/plugins/ide.lua index 312ddac..eaa51c2 100644 --- a/nvim/.config/nvim/lua/plugins/ide.lua +++ b/nvim/.config/nvim/lua/plugins/ide.lua @@ -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