Comments (7)
Yes, I think it is valid still. I will restructure your feature request to "Use closest configuration to file"
from stylua.
we stop at first .stylelua file, somehow it does not stop and merges
this sounds incorrect to me, we don't merge two stylua files together. That sounds like the underlying issue here, rather than adding something else to stop at git roots.
from stylua.
Ah maybe you start the discovery of the style file from the current working directory, which IMO is wrong. Could that be the issue here?
from stylua.
Ah yes, that seems more like it. Indeed, we just use the config found at the cwd across all the code.
I have been thinking about this though - maybe we should be using the closest configuration to the file.
I do question why you are running stylua on a sub module though. I typically think sub modules are vendored code, hence should be ignored by style tools, but maybe that is not the case for you.
from stylua.
from stylua.
Ehm, hehe π yes thats true, bitbthe astronvim distribution works differently :). But tou are right I meant I always executed the format with the cwd in the submodule and since it has a config file that one should be found, strange, I check again in a few days.
Anyway, all format tools actually do this as far as I know from clang-format - start from the file. Please check again, now a bit unsure.
from stylua.
@JohnnyMorganz : Would improve tooling much, since it will pick up the closest .stylelua.toml file and make an astronvim user install much nicer! Looking forward to this. BR
from stylua.
Related Issues (20)
- feature request: regarding support for "func {foo=.., bar=..}" named args syntax HOT 2
- Function definition for a very long variable name results into only closing bracket moved to the next line HOT 1
- Add option to add spaces in function definitions HOT 5
- Ignore VCS ignored files HOT 1
- Is it possible to allow inline functions? HOT 4
- `--respect-ignores`: does not correctly ignore folders without the globbing pattern HOT 2
- Stylua extension won't format files HOT 4
- 1.6.0 doesn't seem to be supporting my Lua files HOT 8
- Stylua doesn't enforce column_width correctly with some inputs HOT 2
- feat: Support LuaCATS comment formatting HOT 3
- Question- Support ? and ` characters? HOT 8
- Could not format file: INTERNAL WARNING: Output AST may be different to input AST. HOT 4
- VSCode plugin error on update: `No release version matches v.`
- Unable to format lua 5.4 code HOT 2
- [Lua 5.2] Parsing error when label is used after break HOT 1
- No uncollapse simple expressions, `collapse_simple_statement` only when already collapsed
- VSCode extension does not honor .editorconfig path overrides
- Failing --test test_ranges locally HOT 2
- Improve formatting of Luau's interpolated string syntax
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stylua.