diff --git a/lua/custom/plugins/format.lua b/lua/custom/plugins/format.lua index 2900aaf1..631e703b 100644 --- a/lua/custom/plugins/format.lua +++ b/lua/custom/plugins/format.lua @@ -47,6 +47,11 @@ return { -- Autoformat return vim.fs.find({ "dprint.json" }, { path = ctx.filename, upward = true })[1] end, }, + prettier = { + condition = function(ctx) + return vim.fs.find({ ".prettierrc" }, { path = ctx.filename, upward = true })[1] + end, + }, -- Example of using shfmt with extra args shfmt = { extra_args = { "-i", "2", "-ci" }, diff --git a/t.ts b/t.ts new file mode 100644 index 00000000..e69de29b