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" },
|
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,18 +55,6 @@ return {
|
|||||||
return { lsp_fallback = true }
|
return { lsp_fallback = true }
|
||||||
end,
|
end,
|
||||||
notify_on_error = true,
|
notify_on_error = true,
|
||||||
formatters = {
|
|
||||||
injected = {
|
|
||||||
options = {
|
|
||||||
ignore_errors = true,
|
|
||||||
lang_to_formatters = {
|
|
||||||
sql = { "sqlfluff" },
|
|
||||||
},
|
|
||||||
lang_to_ext = {
|
|
||||||
sql = "sql",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lang_to_ext = {
|
lang_to_ext = {
|
||||||
bash = "sh",
|
bash = "sh",
|
||||||
sql = "sql",
|
sql = "sql",
|
||||||
@ -76,25 +66,6 @@ return {
|
|||||||
ruby = "rb",
|
ruby = "rb",
|
||||||
teal = "tl",
|
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 = {
|
options = {
|
||||||
-- Use a specific prettier parser for a filetype
|
-- Use a specific prettier parser for a filetype
|
||||||
-- Otherwise, prettier will try to infer the parser from the file name
|
-- Otherwise, prettier will try to infer the parser from the file name
|
||||||
@ -121,6 +92,37 @@ return {
|
|||||||
-- qmd = "markdown",
|
-- 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
|
-- # Example of using dprint only when a dprint.json file is present
|
||||||
-- dprint = {
|
-- dprint = {
|
||||||
-- condition = function(ctx)
|
-- condition = function(ctx)
|
||||||
|
Reference in New Issue
Block a user