A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/JohnnyMorganz/StyLua/releases below:

Releases · JohnnyMorganz/StyLua · GitHub

Releases: JohnnyMorganz/StyLua

Releases · JohnnyMorganz/StyLua

v2.1.0 [2.1.0] - 2025-04-21 Added Changed Fixed External Contributions New Contributors

Full Changelog: v2.0.2...v2.1.0

v2.0.2 [2.0.2] - 2024-12-07 Fixed v2.0.1 [2.0.1] - 2024-11-18 Added Fixed

Full Changelog: v2.0.0...v2.0.1

v2.0.0

StyLua has officially stabilised to v2.0.0. With this, we make a commitment that the formatting output is fairly stable across minor version bumps. More details: #459

Key Changes

This release updates the internal Lua parser, bringing performance improvements and new Luau syntax features.

LuaJIT is now separate from Lua5.2, with its own feature flag.

Runtime syntax selection

By default, StyLua runs with a parser that is able to handle a variety of different Lua syntaxes at once, with a goal of being easily usable on different codebases. However, there are times where 2 different syntax definitions conflict, introducing ambiguity. For example, Lua 5.2 label syntax (::label::) conflicts with Luau's type assertion syntax (x :: number), and the latter ends up taking priority.

Now, you can select a particular style of syntax at runtime to deal with these ambiguities.

In your stylua.toml file, add:

syntax = "Lua52" # Possible values: All, Lua51, Lua52, Lua53, Lua54, LuaJIT, Luau

Or, specify --syntax lua52 on the command line.

The default remains "All" to handle all syntaxes as much as possible.

More details: #407

Updated Configuration Resolution

Previously, StyLua would only search for a stylua.toml (or .stylua.toml) file in the directory where the binary was executed - the current working directory (or its ancestors, if --search-parent-directories is enabled). This means that any configuration files present in subdirectories are not taken into account.

This release changes config resolution to pick up stylua.toml files in subdirectories. Now, a file will format based on the stylua.toml configuration closest to its location. StyLua will search backwards from the file location to the current working directory for a configuration file. By default, searching will stop at the current working directory, however it will continue if --search-parent-directories is enabled.

More details: #916

[2.0.0] - 2024-11-17 Breaking Changes Added Changed Fixed What's Changed New Contributors

Full Changelog: v0.20.0...v2.0.0

v0.20.0 [0.20.0] - 2024-01-20 Added Changed Fixed General Luau New Contributors

Full Changelog: v0.19.1...v0.20.0

v0.19.1 [0.19.1] - 2023-11-15

This release has no changes. It resolves an issue in our test suite that may affect downstream package management tooling
failing tests (#824)

v0.19.0 [0.19.0] - 2023-11-12 Added Changed Fixed v0.18.2 [0.18.2] - 2023-09-10 Fixed

Full Changelog: v0.18.1...v0.18.2

v0.18.1 [0.18.1] - 2023-07-15 Fixed Luau v0.18.0 [0.18.0] - 2023-06-14 Added
require("foo").bar {
	-- stylua: ignore start
	baz      =0, -- < not formatted
	foo   =   2, -- < not formatted
	-- stylua: ignore end
	bar        =     1234 -- < formatted
}
Changed Fixed
$ stylua --sort-requires test.lua

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4