Skip to content

Commit

Permalink
Improve luals setup
Browse files Browse the repository at this point in the history
  • Loading branch information
gleachkr committed Jan 4, 2025
1 parent 50e9011 commit b3d082e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions .addons/lpeg
Submodule lpeg added at 6b1498
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule ".addons/lpeg"]
path = .addons/lpeg
url = [email protected]:LuaCATS/lpeg.git
7 changes: 7 additions & 0 deletions .luarc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
"workspace.library": [".addons/lpeg/library/lpeg.lua"],
"workspace.ignoreSubmodules" : false,
"diagnostics.globals": ["pandoc"],
"hint.enable": false
}
4 changes: 3 additions & 1 deletion lean.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lpeg = require("lpeg")

local nonwhitespace = (1 - lpeg.S("\n\r\t "))^0

local commentstart = lpeg.P([[/-]])
Expand All @@ -18,5 +20,5 @@ local G = lpeg.P{
}

function Reader(input)
return lpeg.match(G,tostring(input))
return lpeg.match(G, tostring(input))
end

0 comments on commit b3d082e

Please sign in to comment.