StyLua icon indicating copy to clipboard operation
StyLua copied to clipboard

An opinionated Lua code formatter

Results 136 StyLua issues
Sort by recently updated
recently updated
newest added

It would be really neat if stylua could re-order my requires in alphabetical order. It should be an optional parameter because stylua can't assume that require does not have side...

enhancement
rfc/in discussion

```lua exports.ScalarLeafsRule = function(context) return { Field = function(_self, node) local type_ = context:getType() local selectionSet = node.selectionSet if type_ then if isLeafType(getNamedType(type_)) then if selectionSet then local fieldName =...

bug

I'd like to add the `format` script to my `package.json`, so I can execute `npm run format` in my project root. At the moment, I have this added to my...

enhancement

I am not sure if this behavior is intended, so decided to create an issue here. Steps (using `stylua` 0.13.1): - Create file (for example, 'tmp.lua') with following contents: ```lua...

bug
hard

README is currently very long, with a lot of words, and maybe a bit too verbose - it could grow even further in the future. We should cut it down,...

documentation
help wanted

An implementation of the sort requires codemod Enabling sort requires functionality will make stylua sort requires in the top level block of a file accordingly. All requires will move to...

StyLua currently adapts to how you define tables and it preserves that style when it formats. I'd rather StyLua automatically determine the format of a table depending on the size...

Before: ```lua for _, storage in ipairs(self._changedStorage[metatable]) do storage[id] = if storage[id] then table.freeze({ old = storage[id].old, new = new }) else record end ``` After (suggested): ```lua for _,...

enhancement
rfc/in discussion
luau

I've been finding this to be incredibly useful for formatting my silly dumb mistakes but also pointing out my errors too although I sometimes share a tab I'm working on...

enhancement
extension

StyLua is pretty stable now, with the formatting not changing wildly anymore. We should look to stabilise to something like `v2.0.0` Stabilisation Guarantees: - The formatting output is stable, and...