StyLua icon indicating copy to clipboard operation
StyLua copied to clipboard

Prioritize nearest config for `.editorconfig`

Open sharpchen opened this issue 5 months ago • 2 comments

I have a global stylua.toml at user root for my common lua files. When working with real projects with .editorconfig at root, it falls back to global config instead of the local .editorconfig which is not expected. stylua.toml and .editorconfig should be prioritized by the distance from the file being formatted.

sharpchen avatar Jul 10 '25 10:07 sharpchen

This should already be the case for stylua.toml (https://github.com/JohnnyMorganz/StyLua/pull/916).

I guess you are interested in this specifically for .editorconfig

JohnnyMorganz avatar Aug 10 '25 12:08 JohnnyMorganz

yes please include .editorconfig as well

sharpchen avatar Aug 10 '25 12:08 sharpchen