IntelliJ-EmmyLua icon indicating copy to clipboard operation
IntelliJ-EmmyLua copied to clipboard

Any way to add custom operators?

Open psychicteeth opened this issue 7 months ago • 1 comments

你好, Is there any way to add custom operators to my local project that can be picked up by EmmyLua? I am working on the Playdate console and they've added +=, -=, etc which are picked up quite reasonably as errors by EmmyLua.

Working in VS Code with Sumneko lua you can add a file .luarc.json which adds these symbols e.g.

{
    "$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": [
        "../../GitHub/playdate-luacats"
    ]
}

Is this possible in EmmyLua?

谢谢 Alex

psychicteeth avatar Jun 24 '25 09:06 psychicteeth

oop just found emmylua2 i will try that <3

psychicteeth avatar Jun 24 '25 11:06 psychicteeth