mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-21 20:11:06 +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
|
||||
if lazyvim_docs then
|
||||
-- Enable this option to avoid conflicts with Prettier.
|
||||
|
|
@ -31,16 +33,16 @@ return {
|
|||
{
|
||||
"stevearc/conform.nvim",
|
||||
optional = true,
|
||||
---@param opts ConformOpts
|
||||
---@param opts conform.setupOpts
|
||||
opts = function(_, opts)
|
||||
opts.formatters_by_ft = opts.formatters_by_ft or {}
|
||||
for _, ft in ipairs(supported) do
|
||||
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
|
||||
|
||||
opts.formatters = opts.formatters or {}
|
||||
opts.formatters.biome = {
|
||||
opts.formatters["biome-check"] = {
|
||||
require_cwd = true,
|
||||
}
|
||||
end,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue