StyLua
StyLua copied to clipboard
Move config file resolver to library
When using stylua as a library, the only formatting interface it provides are the format_code and format_ast functions, which both already expect a config file. To replicate the config file discovery that the stylua CLI implements, one would have to copy this.
My motivation: For one of my projects I'm creating bindings for other languages to the stylua_lib. There it would be really useful, if I could use the config file discovery.