-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support passing argument to lua functions #394
Comments
Also, research and probably implement something like this: From matrix chat:
|
sayanarijit
added a commit
that referenced
this issue
Nov 5, 2021
This PR adds support for quickly executing arbitrary lua functions, without needing to define a function. Example: ```lua xplr.config.modes.builtin.default.key_bindings.on_key["#"] = { help = "test", messages = { { LuaEvalSilently = [[return { { LogInfo = "foo" } }]] }, { LuaEval = [[return { { LogInfo = io.read() } }]] }, }, } ``` Partly closes: #394
sayanarijit
added a commit
that referenced
this issue
Nov 5, 2021
This PR adds support for quickly executing arbitrary lua functions, without needing to define a function. Example: ```lua xplr.config.modes.builtin.default.key_bindings.on_key["#"] = { help = "test", messages = { { LuaEvalSilently = [[return { { LogInfo = "foo" } }]] }, { LuaEval = [[return { { LogInfo = io.read() } }]] }, }, } ``` Partly closes: #394
sayanarijit
added a commit
that referenced
this issue
Nov 5, 2021
This PR adds support for quickly executing arbitrary lua functions, without needing to define a function. Example: ```lua xplr.config.modes.builtin.default.key_bindings.on_key["#"] = { help = "test", messages = { { LuaEvalSilently = [[return { { LogInfo = "foo" } }]] }, { LuaEval = [[return { { LogInfo = io.read() } }]] }, }, } ``` Partly closes: #394
I have implemented |
sayanarijit
added a commit
that referenced
this issue
Dec 11, 2021
If the argument of `LuaEval` evaluates to a function, xplr will try to pass Lua Context to it. Example: ```lua { LuaEval = [[function(app) return { { LogInfo = app.pwd } } end]] } ``` Closes: #394
sayanarijit
added a commit
that referenced
this issue
Dec 11, 2021
If the argument of `LuaEval` evaluates to a function, xplr will try to pass Lua Context to it. Example: ```lua { LuaEval = [[function(app) return { { LogInfo = app.pwd } } end]] } ``` Closes: #394
sayanarijit
added a commit
that referenced
this issue
Dec 11, 2021
If the argument of `LuaEval` evaluates to a function, xplr will try to pass Lua Context to it. Example: ```lua { LuaEval = [[function(app) return { { LogInfo = app.pwd } } end]] } ``` Closes: #394
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Implement something like
CallLuaWithArg
, using which, users can pass arguments to the Lua functions. Being able to pass one argument should be enough. SerdeValue
should support this.The text was updated successfully, but these errors were encountered: