When using Stylua as an auto-formatter in Zed (or similar editors) it is currently not possible to leverage .styluaignore or similar methods to disable autoformatting for certain paths because Zed invokes stylua via stdin/stdout, e.g. stylua -.
Other formatters, like prettier, support a --stdin-filepath parameter when operating in stdin mode which allows the formatter to still make decisions based on the path/filename, even though the actual actions are handled via stdin/stdout.
This would make it possible for .styluaignore and --g '!vendor/**/*.lua' to apply even when operating via stdin mode.
I was thinking I might take a crack at it, but wanted to post the idea first if anyone had strong opinions.
When using Stylua as an auto-formatter in Zed (or similar editors) it is currently not possible to leverage
.styluaignoreor similar methods to disable autoformatting for certain paths because Zed invokes stylua via stdin/stdout, e.g.stylua -.Other formatters, like prettier, support a
--stdin-filepathparameter when operating in stdin mode which allows the formatter to still make decisions based on the path/filename, even though the actual actions are handled via stdin/stdout.This would make it possible for
.styluaignoreand--g '!vendor/**/*.lua'to apply even when operating via stdin mode.I was thinking I might take a crack at it, but wanted to post the idea first if anyone had strong opinions.