mirror of
https://github.com/lune-org/mlua-luau-scheduler.git
synced 2025-04-10 21:40:55 +01:00
Add stylua and other formatters, apply formatting
This commit is contained in:
parent
99409e4b7a
commit
ae1535fcc4
6 changed files with 44 additions and 12 deletions
8
.vscode/extensions.json
vendored
Normal file
8
.vscode/extensions.json
vendored
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"rust-lang.rust-analyzer",
|
||||||
|
"esbenp.prettier-vscode",
|
||||||
|
"JohnnyMorganz.stylua",
|
||||||
|
"DavidAnson.vscode-markdownlint"
|
||||||
|
]
|
||||||
|
}
|
17
.vscode/settings.json
vendored
Normal file
17
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"luau-lsp.sourcemap.enabled": false,
|
||||||
|
"luau-lsp.types.roblox": false,
|
||||||
|
"rust-analyzer.check.command": "clippy",
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"stylua.searchParentDirectories": true,
|
||||||
|
"prettier.tabWidth": 2,
|
||||||
|
"[luau][lua]": {
|
||||||
|
"editor.defaultFormatter": "JohnnyMorganz.stylua"
|
||||||
|
},
|
||||||
|
"[json][jsonc][markdown][yaml]": {
|
||||||
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
|
},
|
||||||
|
"[rust]": {
|
||||||
|
"editor.defaultFormatter": "rust-lang.rust-analyzer"
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,12 +1,10 @@
|
||||||
--!nocheck
|
--!nocheck
|
||||||
--!nolint UnknownGlobal
|
--!nolint UnknownGlobal
|
||||||
|
|
||||||
|
|
||||||
if math.random() < 0.25 then
|
if math.random() < 0.25 then
|
||||||
error("Unlucky error!")
|
error("Unlucky error!")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local main = coroutine.running()
|
local main = coroutine.running()
|
||||||
local start = os.clock()
|
local start = os.clock()
|
||||||
|
|
||||||
|
|
9
stylua.toml
Normal file
9
stylua.toml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
column_width = 100
|
||||||
|
line_endings = "Unix"
|
||||||
|
indent_type = "Tabs"
|
||||||
|
indent_width = 4
|
||||||
|
quote_style = "AutoPreferDouble"
|
||||||
|
call_parentheses = "Always"
|
||||||
|
|
||||||
|
[sort_requires]
|
||||||
|
enabled = true
|
Loading…
Add table
Reference in a new issue