Ketho / vscode-wow-api

VS Code extension for World of Warcraft AddOns
https://marketplace.visualstudio.com/items?itemName=ketho.wow-api
MIT License
151 stars 33 forks source link

Add globals to settings.json #10

Closed Ketho closed 3 years ago

Ketho commented 3 years ago

I'll need to find a way to populate the settings.json (or a separate file that adds to settings.json) because I don't want to document everything in EmmyLua, just marking something as global would be enough.

    "Lua.diagnostics.globals": [
        "WorldMapFrame"
    ]

Especially since using empty or bad emmylua annotations is arguably worse instead of marking globals for the undefined-global warnings.

Ketho commented 3 years ago

This solution does not add all globals to Lua.diagnostics.globals, nor does it scan the files or warnings for undefined globals that we know of. Currently it just tries to be helpful and automatically marks the global (e.g. LE enums) on completion.