aboutsummaryrefslogtreecommitdiffstats
path: root/lua/conform
diff options
context:
space:
mode:
authorpseudometa <73286100+chrisgrieser@users.noreply.github.com>2023-11-27 17:46:40 +0100
committerGitHub <noreply@github.com>2023-11-27 08:46:40 -0800
commitdb9da1aa57e8be683ada1b1e5f8129c28d2576eb (patch)
tree2837fc9259fe75044acda4a39b59b76379d43faa /lua/conform
parentcbc510ca5b4aec1fd104b6c6f070a7fcf36cc0c8 (diff)
fix: respect excluded-files-config from `typos.toml` (#219)
Diffstat (limited to 'lua/conform')
-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 },
}