From 214f5fccdf468030b05851ebfbef8394485322fb Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 7 Jun 2024 23:01:14 +0200 Subject: [PATCH] feat(prettier): with the prettier & astro extra, prettier will be enabled if the prettier-astro-plugin is available --- lua/lazyvim/plugins/extras/lang/astro.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/astro.lua b/lua/lazyvim/plugins/extras/lang/astro.lua index b0bd2616..a4384148 100644 --- a/lua/lazyvim/plugins/extras/lang/astro.lua +++ b/lua/lazyvim/plugins/extras/lang/astro.lua @@ -41,4 +41,14 @@ return { }) end, }, + + { + "conform.nvim", + opts = function(_, opts) + if LazyVim.has_extra("formatting.prettier") then + opts.formatters_by_ft = opts.formatters_by_ft or {} + opts.formatters_by_ft.astro = { "prettier" } + end + end, + }, }