LuaLS / LuaLS/vscode-lua

"|lambda|" isn't listed in "Lua.runtime.nonstandardSymbol"

Open
#145 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
215
Forks
62
PR merge metrics
No merged PRs in 30d

Description

Which OS are you using?

Windows

Expected Behaviour

https://github.com/LuaLS/lua-language-server/pull/2720 added support for lamda style functions with "|lambda|" as an option for non standard symbols. This change was released in 3.10.0, but it can't be used in VSCode because "|lambda|" is not yet listed as an options. It need to be added to the package.json.

Actual Behaviour

Setting "Lua.runtime.nonstandardSymbol": ["|lambda|"] in settings.json should add support for lamda style functions, such as: Wait.frames(|| print("Hello World"), 60). Instead you get a warning:

Value is not accepted. Valid values: "//", "/**/", "`", "+=", "-=", "*=", "/=", "%=", "^=", "//=", "|=", "&=", "<<=", ">>=", "||", "&&", "!", "!=", "continue".

Reproduction steps
  1. Open your settings.json in VSCode
  2. Add `"Lua.runtime.nonstandardSymbol": ["|lambda|"]
  3. You get a warning
Additional Notes

No response

Log

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open package.json around the runtime.nonstandardSymbol setting referenced at line 2911. Compare the listed accepted values with the Lua language server's supported |lambda| option, then update the setting metadata so VSCode accepts it. Reproduce the settings.json example to confirm the warning is gone.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.