fix(prettier): fixup
This commit is contained in:
@ -10,7 +10,6 @@ local M = {}
|
||||
|
||||
local supported = {
|
||||
"css",
|
||||
"fish",
|
||||
"graphql",
|
||||
"handlebars",
|
||||
"html",
|
||||
@ -19,14 +18,9 @@ local supported = {
|
||||
"json",
|
||||
"jsonc",
|
||||
"less",
|
||||
"lua",
|
||||
"markdown",
|
||||
"markdown.mdx",
|
||||
"mysql",
|
||||
"plsql",
|
||||
"scss",
|
||||
"sh",
|
||||
"sql",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"vue",
|
||||
@ -79,12 +73,11 @@ return {
|
||||
opts.formatters_by_ft[ft] = { "prettier" }
|
||||
end
|
||||
|
||||
opts.formatters = {
|
||||
prettier = {
|
||||
condition = function(_, ctx)
|
||||
return M.has_parser(ctx) and (vim.g.lazyvim_prettier_needs_config ~= true or M.has_config(ctx))
|
||||
end,
|
||||
},
|
||||
opts.formatters = opts.formatters or {}
|
||||
opts.formatters.prettier = {
|
||||
condition = function(_, ctx)
|
||||
return M.has_parser(ctx) and (vim.g.lazyvim_prettier_needs_config ~= true or M.has_config(ctx))
|
||||
end,
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
Reference in New Issue
Block a user