aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/conform/formatters/typos.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/lua/conform/formatters/typos.lua b/lua/conform/formatters/typos.lua
index e6ae668..c571629 100644
--- a/lua/conform/formatters/typos.lua
+++ b/lua/conform/formatters/typos.lua
@@ -5,7 +5,13 @@ return {
description = "Source code spell checker",
},
command = "typos",
- stdin = true,
- args = { "--write-changes", "-" },
+ -- cannot use stdin, as otherwise `typos` has no information on the filename,
+ -- making excluded-file-configs ineffective
+ stdin = false,
+ args = {
+ "--write-changes",
+ "--force-exclude", -- so excluded files in the config take effect
+ "$FILENAME",
+ },
exit_codes = { 0, 2 },
}