diff options
author | pseudometa <73286100+chrisgrieser@users.noreply.github.com> | 2023-11-27 17:46:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-27 08:46:40 -0800 |
commit | db9da1aa57e8be683ada1b1e5f8129c28d2576eb (patch) | |
tree | 2837fc9259fe75044acda4a39b59b76379d43faa /lua/conform | |
parent | cbc510ca5b4aec1fd104b6c6f070a7fcf36cc0c8 (diff) |
fix: respect excluded-files-config from `typos.toml` (#219)
Diffstat (limited to 'lua/conform')
-rw-r--r-- | lua/conform/formatters/typos.lua | 10 |
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 }, } |