setup luacats
This commit is contained in:
parent
f5a4ad11c6
commit
2d9c206552
17
flake.lock
17
flake.lock
|
@ -1,5 +1,21 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"luacats": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1740447442,
|
||||||
|
"narHash": "sha256-naorkTPkgJiEevBfpdRQtbCikN5YGiqWeIAWzCsEW4Q=",
|
||||||
|
"owner": "notpeter",
|
||||||
|
"repo": "playdate-luacats",
|
||||||
|
"rev": "7e56adacbbaceef923f24d898706aa3dec2225c1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "notpeter",
|
||||||
|
"repo": "playdate-luacats",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1740367490,
|
"lastModified": 1740367490,
|
||||||
|
@ -38,6 +54,7 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"luacats": "luacats",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"playdate-sdk": "playdate-sdk"
|
"playdate-sdk": "playdate-sdk"
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,9 +7,13 @@
|
||||||
url = "github:RegularTetragon/playdate-sdk-flake";
|
url = "github:RegularTetragon/playdate-sdk-flake";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
luacats = {
|
||||||
|
url = "github:notpeter/playdate-luacats";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, playdate-sdk }:
|
outputs = { self, nixpkgs, playdate-sdk, luacats }:
|
||||||
let system = "x86_64-linux";
|
let system = "x86_64-linux";
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
playdate-sdk-pkg = playdate-sdk.packages.${system}.default;
|
playdate-sdk-pkg = playdate-sdk.packages.${system}.default;
|
||||||
|
@ -18,12 +22,14 @@
|
||||||
mkShell {
|
mkShell {
|
||||||
env = {
|
env = {
|
||||||
PLAYDATE_SDK_PATH = playdate-sdk-pkg;
|
PLAYDATE_SDK_PATH = playdate-sdk-pkg;
|
||||||
|
LUACATS_PATH = luacats.outPath;
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
just
|
just
|
||||||
lua-language-server
|
lua-language-server
|
||||||
playdate-sdk-pkg
|
playdate-sdk-pkg
|
||||||
|
nushell
|
||||||
tup
|
tup
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
3
justfile
3
justfile
|
@ -11,3 +11,6 @@ simu: build
|
||||||
cook-assets:
|
cook-assets:
|
||||||
@(which aseprite > /dev/null) || (echo "Missing aseprite program"; exit 1)
|
@(which aseprite > /dev/null) || (echo "Missing aseprite program"; exit 1)
|
||||||
tup
|
tup
|
||||||
|
|
||||||
|
setup:
|
||||||
|
tools/gen-luarc.nu
|
||||||
|
|
8
tools/gen-luarc.nu
Normal file
8
tools/gen-luarc.nu
Normal 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
19
tools/luarc_sample.json
Normal 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": []
|
||||||
|
}
|
Loading…
Reference in a new issue