From 38936579f0de5163ddefc48e71cf18279003f742 Mon Sep 17 00:00:00 2001 From: xfy Date: Tue, 8 Apr 2025 11:46:47 +0800 Subject: [PATCH] change prettier formatter to prettierd --- lua/rua/plugins/formatting.lua | 35 +++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/lua/rua/plugins/formatting.lua b/lua/rua/plugins/formatting.lua index 1f81a3c..24451c7 100644 --- a/lua/rua/plugins/formatting.lua +++ b/lua/rua/plugins/formatting.lua @@ -10,24 +10,25 @@ return { lua = { "stylua" }, go = { "goimports", "gofumpt" }, sh = { "shfmt" }, - javascript = { "prettier" }, - typescript = { "prettier" }, - javascriptreact = { "prettier" }, - typescriptreact = { "prettier" }, - svelte = { "prettier" }, - css = { "prettier" }, - less = { "prettier" }, - scss = { "prettier" }, - html = { "prettier" }, - json = { "prettier" }, - yaml = { "prettier" }, - ["markdown"] = { "prettier" }, - ["markdown.mdx"] = { "prettier" }, - graphql = { "prettier" }, + javascript = { "prettierd" }, + typescript = { "prettierd" }, + javascriptreact = { "prettierd" }, + typescriptreact = { "prettierd" }, + svelte = { "prettierd" }, + css = { "prettierd" }, + less = { "prettierd" }, + scss = { "prettierd" }, + html = { "prettierd" }, + json = { "prettierd" }, + yaml = { "prettierd" }, + ["markdown"] = { "prettierd" }, + ["markdown.mdx"] = { "prettierd" }, + graphql = { "prettierd" }, python = { "isort", "black" }, php = { "intelephense" }, c = { "clang-format" }, rust = { "rustfmt", lsp_format = "fallback" }, + toml = { "taplo" }, -- Use the "*" filetype to run formatters on all filetypes. -- ["*"] = { "codespell" }, -- Use the "_" filetype to run formatters on filetypes that don't @@ -67,8 +68,8 @@ return { teal = "tl", }, options = { - -- Use a specific prettier parser for a filetype - -- Otherwise, prettier will try to infer the parser from the file name + -- Use a specific prettierd parser for a filetype + -- Otherwise, prettierd will try to infer the parser from the file name ft_parsers = { -- javascript = "babel", -- javascriptreact = "babel", @@ -87,7 +88,7 @@ return { -- graphql = "graphql", -- handlebars = "glimmer", }, - -- Use a specific prettier parser for a file extension + -- Use a specific prettierd parser for a file extension ext_parsers = { -- qmd = "markdown", },