🐛 fix(nvim): correctly use biome json file
This commit is contained in:
parent
f749811f40
commit
ed23eae439
2 changed files with 2 additions and 3 deletions
|
@ -20,8 +20,6 @@ return {
|
||||||
{
|
{
|
||||||
"stevearc/conform.nvim",
|
"stevearc/conform.nvim",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
--- Extend the conform plugin config and add given formatters
|
|
||||||
---@param tbl table<string, conform.FormatterUnit[]> Table of filetype to formatters mappings
|
|
||||||
local function add_formatters(tbl)
|
local function add_formatters(tbl)
|
||||||
for ft, formatters in pairs(tbl) do
|
for ft, formatters in pairs(tbl) do
|
||||||
if opts.formatters_by_ft[ft] == nil then
|
if opts.formatters_by_ft[ft] == nil then
|
||||||
|
@ -42,6 +40,7 @@ return {
|
||||||
})
|
})
|
||||||
|
|
||||||
opts.formatters = {
|
opts.formatters = {
|
||||||
|
cwd = require("conform.util").root_file({ "biome.json" }),
|
||||||
biome = {
|
biome = {
|
||||||
condition = function(self, ctx)
|
condition = function(self, ctx)
|
||||||
return vim.fs.find({ "biome.json" }, { path = ctx.filename, upward = true })[1]
|
return vim.fs.find({ "biome.json" }, { path = ctx.filename, upward = true })[1]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://biomejs.dev/schemas/1.4.0/schema.json",
|
"$schema": "https://biomejs.dev/schemas/1.5.1/schema.json",
|
||||||
"organizeImports": {
|
"organizeImports": {
|
||||||
"enabled": true
|
"enabled": true
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue