v0.17.0
[0.17.0] - 2023-03-11
Added
- Added support for "sort requires", which sorts top-level statements of the form
local NAME = require(EXPR)
lexicographically onNAME
.
We do this by treating a group of consecutive requires as a "block", and then sorting only within the block. Any other statement, or an empty line, between require statements will split the group into two separate blocks (and can be used to separate the sorting). A block of requires will not move around the file.
Roblox Luau statements of the formlocal NAME = game:GetService(EXPR)
will also be sorted separately.
This feature is disabled by default. To enable it, add the following to your stylua.toml
:
[sort_requires]
enabled = true
Note: we assume that all requires are pure with no side effects. It is not recommended to use this feature if the ordering of your requires matter.
- Added support for EditorConfig, which is taken into account only if no
stylua.toml
was found.
This feature is enabled by default, it can be disabled using --no-editorconfig
.
- Published StyLua to the Docker Hub
What's Changed
- Sort requires by @JohnnyMorganz in #653
- Add default
editorconfig
feature by @LEI in #645 - extension: Pass cwd as workspace folder for version check by @JohnnyMorganz in #659
- Add Dockerfile by @eberkund in #655
New Contributors
Full Changelog: v0.16.1...v0.17.0