mirror of
https://github.com/DefectingCat/nvim
synced 2025-07-15 16:51:33 +00:00
update formmatters
This commit is contained in:
@ -16,6 +16,8 @@ return {
|
||||
typescriptreact = { "prettier" },
|
||||
svelte = { "prettier" },
|
||||
css = { "prettier" },
|
||||
less = { "prettier" },
|
||||
scss = { "prettier" },
|
||||
html = { "prettier" },
|
||||
json = { "prettier" },
|
||||
yaml = { "prettier" },
|
||||
@ -53,18 +55,6 @@ return {
|
||||
return { lsp_fallback = true }
|
||||
end,
|
||||
notify_on_error = true,
|
||||
formatters = {
|
||||
injected = {
|
||||
options = {
|
||||
ignore_errors = true,
|
||||
lang_to_formatters = {
|
||||
sql = { "sqlfluff" },
|
||||
},
|
||||
lang_to_ext = {
|
||||
sql = "sql",
|
||||
},
|
||||
},
|
||||
},
|
||||
lang_to_ext = {
|
||||
bash = "sh",
|
||||
sql = "sql",
|
||||
@ -76,25 +66,6 @@ return {
|
||||
ruby = "rb",
|
||||
teal = "tl",
|
||||
},
|
||||
sqlfluff = {
|
||||
command = "sqlfluff",
|
||||
args = {
|
||||
"fix",
|
||||
"--dialect",
|
||||
"sqlite",
|
||||
"--disable-progress-bar",
|
||||
"-f",
|
||||
"-n",
|
||||
"-",
|
||||
},
|
||||
stdin = true,
|
||||
},
|
||||
rustfmt = {
|
||||
options = {
|
||||
-- The default edition of Rust to use when no Cargo.toml file is found
|
||||
default_edition = "2021",
|
||||
},
|
||||
},
|
||||
options = {
|
||||
-- Use a specific prettier parser for a filetype
|
||||
-- Otherwise, prettier will try to infer the parser from the file name
|
||||
@ -121,6 +92,37 @@ return {
|
||||
-- qmd = "markdown",
|
||||
},
|
||||
},
|
||||
formatters = {
|
||||
injected = {
|
||||
options = {
|
||||
ignore_errors = true,
|
||||
lang_to_formatters = {
|
||||
sql = { "sqlfluff" },
|
||||
},
|
||||
lang_to_ext = {
|
||||
sql = "sql",
|
||||
},
|
||||
},
|
||||
},
|
||||
sqlfluff = {
|
||||
command = "sqlfluff",
|
||||
args = {
|
||||
"fix",
|
||||
"--dialect",
|
||||
"sqlite",
|
||||
"--disable-progress-bar",
|
||||
"-f",
|
||||
"-n",
|
||||
"-",
|
||||
},
|
||||
stdin = true,
|
||||
},
|
||||
rustfmt = {
|
||||
options = {
|
||||
-- The default edition of Rust to use when no Cargo.toml file is found
|
||||
default_edition = "2021",
|
||||
},
|
||||
},
|
||||
-- # Example of using dprint only when a dprint.json file is present
|
||||
-- dprint = {
|
||||
-- condition = function(ctx)
|
||||
|
Reference in New Issue
Block a user