aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorSteven Arcangeli <stevearc@stevearc.com>2024-06-05 13:55:20 -0700
committerSteven Arcangeli <stevearc@stevearc.com>2024-06-05 13:55:20 -0700
commit355049bc318c3c968b2b434cea9a5bcdf6bf8ea7 (patch)
tree742126db0cafe7268221b26b8b19012f7e44a0f5 /lua
parent3f610236caf3db6576a0dd7760e5b0731659db68 (diff)
fix(rustfmt): add a default cwd when config file is detected (#419)
Diffstat (limited to 'lua')
-rw-r--r--lua/conform/formatters/rustfmt.lua4
-rw-r--r--lua/conform/formatters/yew-fmt.lua4
2 files changed, 8 insertions, 0 deletions
diff --git a/lua/conform/formatters/rustfmt.lua b/lua/conform/formatters/rustfmt.lua
index e33fb86..6978189 100644
--- a/lua/conform/formatters/rustfmt.lua
+++ b/lua/conform/formatters/rustfmt.lua
@@ -18,4 +18,8 @@ return {
return args
end,
+ cwd = util.root_file({
+ "rustfmt.toml",
+ ".rustfmt.toml",
+ }),
}
diff --git a/lua/conform/formatters/yew-fmt.lua b/lua/conform/formatters/yew-fmt.lua
index f441fdf..cb94a56 100644
--- a/lua/conform/formatters/yew-fmt.lua
+++ b/lua/conform/formatters/yew-fmt.lua
@@ -18,4 +18,8 @@ return {
return args
end,
+ cwd = util.root_file({
+ "rustfmt.toml",
+ ".rustfmt.toml",
+ }),
}