Skip to content

Commit

Permalink
fix: set a cwd for dprint (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
azzamsa committed Jan 5, 2024
1 parent c4b2efb commit e6c1353
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lua/conform/formatters/dprint.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
local util = require("conform.util")
---@type conform.FileFormatterConfig
return {
meta = {
Expand All @@ -6,4 +7,10 @@ return {
},
command = "dprint",
args = { "fmt", "--stdin", "$FILENAME" },
cwd = util.root_file({
"dprint.json",
".dprint.json",
"dprint.jsonc",
".dprint.jsonc",
}),
}

0 comments on commit e6c1353

Please sign in to comment.