Crate stylua_lib

Source

Modules§

editorconfig

Macros§

fmt_op
fmt_symbol

Structs§

Config
The configuration to use when formatting.
Range
An optional formatting range. If provided, only content within these boundaries (inclusive) will be formatted. Both boundaries are optional, and are given as byte offsets from the beginning of the file.
SortRequiresConfig
Configuration for the Sort Requires codemod

Enums§

CallParenType
When to use call parentheses
CollapseSimpleStatement
What mode to use if we want to collapse simple functions / guard statements
Error
A formatting error
IndentType
The type of indents to use when indenting
LineEndings
The type of line endings to use at the end of a line
LuaVersion
The Lua syntax version to use
OutputVerification
The type of verification to perform to validate that the output AST is still correct.
QuoteStyle
The style of quotes to use within string literals
SpaceAfterFunctionNames
When to use spaces after function names

Functions§

format_ast
Formats given Ast
format_code
Formats given Lua code