Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@ jobs:
- name: Check formatting
run: mise run fmt:check

lint:
name: Run Lua Lint
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v6.0.2

- name: Set up tools via mise
uses: jdx/mise-action@v4.0.1

- name: Run Lua lint
run: mise run lua:lint

test:
name: Run Tests
runs-on: ubuntu-latest
Expand Down
Empty file added .gitignore
Empty file.
36 changes: 36 additions & 0 deletions .lua_ls/busted.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---@meta

---@alias BustedCallback fun()

---@param name string
---@param callback BustedCallback
function describe(name, callback) end

---@param name string
---@param callback BustedCallback
function it(name, callback) end

---@param name string
---@param callback BustedCallback
function active_it(name, callback) end

---@param callback BustedCallback
function before_each(callback) end

---@param callback BustedCallback
function after_each(callback) end

---@param name string
---@param callback? BustedCallback
function pending(name, callback) end

---@class LuassertChain
---@field same fun(expected: any, actual: any, message?: string)
---@field equals fun(expected: any, actual: any, message?: string)
---@field is_true fun(value: any, message?: string)

---@class Luassert: LuassertChain
---@field are LuassertChain

---@type Luassert|function
assert = assert
14 changes: 14 additions & 0 deletions .luarc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
"runtime.version": "LuaJIT",
"diagnostics.globals": [
"vim"
],
"workspace.library": [
".lua_ls"
],
"workspace.checkThirdParty": false,
"workspace.ignoreDir": [
".git"
]
}
19 changes: 14 additions & 5 deletions dprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,20 @@
},
"markdown": {
},
"toml": {
},
"yaml": {
},
"exec": {
"commands": [
{
"command": "stylua --allow-hidden --respect-ignores --stdin-filepath {{file_path}} -",
"exts": [".lua"]
},
{
"command": "taplo format -",
"exts": [".toml"]
}
]
},
"excludes": [
"CHANGELOG.md",
"**/*-lock.json"
Expand All @@ -20,10 +30,9 @@
"**/*.toml"
],
"plugins": [
"https://plugins.dprint.dev/RubixDev/stylua-v0.2.1.wasm",
"https://plugins.dprint.dev/json-0.21.3.wasm",
"https://plugins.dprint.dev/markdown-0.22.1.wasm",
"https://plugins.dprint.dev/toml-0.7.0.wasm",
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.6.0.wasm"
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.6.0.wasm",
"https://plugins.dprint.dev/exec-0.6.0.json@a054130d458f124f9b5c91484833828950723a5af3f8ff2bd1523bd47b83b364"
]
}
Loading