mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-22 04:21:08 +00:00
fix(biome): use biome-check in conform that also fixes linting issues and sorts imports
This commit is contained in:
parent
31caef21fd
commit
954d8746e5
1 changed files with 5 additions and 3 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
---@module "conform"
|
||||||
|
|
||||||
---@diagnostic disable: inject-field
|
---@diagnostic disable: inject-field
|
||||||
if lazyvim_docs then
|
if lazyvim_docs then
|
||||||
-- Enable this option to avoid conflicts with Prettier.
|
-- Enable this option to avoid conflicts with Prettier.
|
||||||
|
|
@ -31,16 +33,16 @@ return {
|
||||||
{
|
{
|
||||||
"stevearc/conform.nvim",
|
"stevearc/conform.nvim",
|
||||||
optional = true,
|
optional = true,
|
||||||
---@param opts ConformOpts
|
---@param opts conform.setupOpts
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
opts.formatters_by_ft = opts.formatters_by_ft or {}
|
opts.formatters_by_ft = opts.formatters_by_ft or {}
|
||||||
for _, ft in ipairs(supported) do
|
for _, ft in ipairs(supported) do
|
||||||
opts.formatters_by_ft[ft] = opts.formatters_by_ft[ft] or {}
|
opts.formatters_by_ft[ft] = opts.formatters_by_ft[ft] or {}
|
||||||
table.insert(opts.formatters_by_ft[ft], "biome")
|
table.insert(opts.formatters_by_ft[ft], "biome-check")
|
||||||
end
|
end
|
||||||
|
|
||||||
opts.formatters = opts.formatters or {}
|
opts.formatters = opts.formatters or {}
|
||||||
opts.formatters.biome = {
|
opts.formatters["biome-check"] = {
|
||||||
require_cwd = true,
|
require_cwd = true,
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue