setup luacats

This commit is contained in:
Fabien Freling 2025-03-11 13:33:18 +01:00
parent f5a4ad11c6
commit 2d9c206552
5 changed files with 54 additions and 1 deletions

8
tools/gen-luarc.nu Normal file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env nu
def main [] {
const here = path self .
let sample = open ($here | path join luarc_sample.json)
mut updated = $sample | update "workspace.library" { $env.LUACATS_PATH}
$updated | save --force ($here | path join .. .luarc.json)
}

19
tools/luarc_sample.json Normal file
View file

@ -0,0 +1,19 @@
{
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
"diagnostics.globals": ["import"],
"diagnostics.severity": {
"duplicate-set-field": "Hint"
},
"format.defaultConfig": {
"indent_style": "space",
"indent_size": "4"
},
"runtime.builtin": {
"io": "disable",
"os": "disable",
"package": "disable"
},
"runtime.nonstandardSymbol": ["+=", "-=", "*=", "/=", "//=", "%=", "<<=", ">>=", "&=", "|=", "^="],
"runtime.version": "Lua 5.4",
"workspace.library": []
}