Cargo Features

[dependencies]
stylua = { version = "2.3.1", default-features = false, features = ["serialize", "fromstr", "luau", "lua52", "lua53", "lua54", "luajit", "cfxlua", "editorconfig", "lsp", "wasm-bindgen"] }
default = editorconfig, lsp, wasm-bindgen

These default features are set whenever stylua is added without default-features = false somewhere in the dependency tree.

serialize
fromstr = strum
luau

Enables roblox of full_moon

full_moon:

backwards compatibility

Affects formatters::luau, formatters::compound_assignment

lua52 lua53?

Enables lua52 of full_moon

Affects formatters::goto

lua53 lua54? = lua52

Enables lua53 of full_moon

lua54 cfxlua? = lua53

Enables lua54 of full_moon

Affects formatters::lua54

luajit

Enables luajit of full_moon

Affects formatters::goto

cfxlua = lua54

Enables cfxlua of full_moon

Affects formatters::compound_assignment

editorconfig default = ec4rs

Affects opt::Opt.no_editorconfig, stylua::editorconfig

lsp default = lsp-server, lsp-textdocument, lsp-types

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

ec4rs editorconfig
strum fromstr?

Enables strum ^0.25.0

lsp-server lsp
lsp-types lsp
lsp-textdocument lsp

Enables lsp-textdocument ^0.4.2

wasm-bindgen wasm32 default

Affects stylua::format_code_wasm