update formmatters

This commit is contained in:
xfy
2025-04-03 14:24:15 +08:00
parent df426d2d9e
commit 8ad66945f5

View File

@ -16,6 +16,8 @@ return {
typescriptreact = { "prettier" }, typescriptreact = { "prettier" },
svelte = { "prettier" }, svelte = { "prettier" },
css = { "prettier" }, css = { "prettier" },
less = { "prettier" },
scss = { "prettier" },
html = { "prettier" }, html = { "prettier" },
json = { "prettier" }, json = { "prettier" },
yaml = { "prettier" }, yaml = { "prettier" },
@ -53,6 +55,43 @@ return {
return { lsp_fallback = true } return { lsp_fallback = true }
end, end,
notify_on_error = true, notify_on_error = true,
lang_to_ext = {
bash = "sh",
sql = "sql",
c_sharp = "cs",
elixir = "exs",
latex = "tex",
markdown = "md",
python = "py",
ruby = "rb",
teal = "tl",
},
options = {
-- Use a specific prettier parser for a filetype
-- Otherwise, prettier will try to infer the parser from the file name
ft_parsers = {
-- javascript = "babel",
-- javascriptreact = "babel",
-- typescript = "typescript",
-- typescriptreact = "typescript",
-- vue = "vue",
-- css = "css",
-- scss = "scss",
-- less = "less",
-- html = "html",
-- json = "json",
-- jsonc = "json",
-- yaml = "yaml",
-- markdown = "markdown",
-- ["markdown.mdx"] = "mdx",
-- graphql = "graphql",
-- handlebars = "glimmer",
},
-- Use a specific prettier parser for a file extension
ext_parsers = {
-- qmd = "markdown",
},
},
formatters = { formatters = {
injected = { injected = {
options = { options = {
@ -65,17 +104,6 @@ return {
}, },
}, },
}, },
lang_to_ext = {
bash = "sh",
sql = "sql",
c_sharp = "cs",
elixir = "exs",
latex = "tex",
markdown = "md",
python = "py",
ruby = "rb",
teal = "tl",
},
sqlfluff = { sqlfluff = {
command = "sqlfluff", command = "sqlfluff",
args = { args = {
@ -95,32 +123,6 @@ return {
default_edition = "2021", default_edition = "2021",
}, },
}, },
options = {
-- Use a specific prettier parser for a filetype
-- Otherwise, prettier will try to infer the parser from the file name
ft_parsers = {
-- javascript = "babel",
-- javascriptreact = "babel",
-- typescript = "typescript",
-- typescriptreact = "typescript",
-- vue = "vue",
-- css = "css",
-- scss = "scss",
-- less = "less",
-- html = "html",
-- json = "json",
-- jsonc = "json",
-- yaml = "yaml",
-- markdown = "markdown",
-- ["markdown.mdx"] = "mdx",
-- graphql = "graphql",
-- handlebars = "glimmer",
},
-- Use a specific prettier parser for a file extension
ext_parsers = {
-- qmd = "markdown",
},
},
-- # Example of using dprint only when a dprint.json file is present -- # Example of using dprint only when a dprint.json file is present
-- dprint = { -- dprint = {
-- condition = function(ctx) -- condition = function(ctx)