Crates.io | dprint-plugin-stylua |
lib.rs | dprint-plugin-stylua |
version | 0.2.1 |
source | src |
created_at | 2022-10-31 10:51:25.061308 |
updated_at | 2022-10-31 10:51:25.061308 |
description | StyLua integration for dprint |
homepage | https://github.com/RubixDev/dprint-plugin-stylua |
repository | https://github.com/RubixDev/dprint-plugin-stylua |
max_upload_size | |
id | 702114 |
size | 46,124 |
Format Lua code through dprint using StyLua
Add the plugin to your config file by running
dprint config add RubixDev/stylua
. Alternatively you can manually add the
plugin:
{
// ...etc...
"plugins": ["https://plugins.dprint.dev/RubixDev/stylua-v0.1.0.wasm"],
"stylua": {
// config goes here
}
}
Don't forget to add lua
to your includes
pattern.
Name | Type | Default | Possible values |
---|---|---|---|
lineWidth | u32 | global config or 120 |
0 — 4294967295 |
useTabs | bool | global config or 2 |
true , false |
indentWidth | u8 | global config or false |
0 — 255 |
newLineKind | NewLineKind | global config or lf |
auto , lf , crlf , system |
verify | bool | false |
true , false |
quoteStyle | QuoteStyle | AutoPreferDouble |
AutoPreferDouble , AutoPreferSingle , ForceDouble , ForceSingle |
callParanetheses | CallParenType | Always |
Always , NoSingleString , NoSingleTable , None |
collapseSimpleStatement | CollapseSimpleStatement | Never |
Never , FunctionOnly , ConditionalOnly , Always |
Also have a look at the StyLua configuration.