View Single Post
12/19/23, 04:24 PM   #1
vsrs_au
Join Date: Dec 2022
Posts: 18
How to get VSCode to recognise XML objects in LUA files?

I'm using VSCode, with some LUA plugins, to write a ESOUI addon, and I've managed to configure the sumneko.lua VSCode extension to recognise ESOUI global functions and constants (e.g. events). It still flags any objects defined in the addon's XML files as unknown, though. Is there any way to configure VSCode to find these definitions?

VSCode also flags the constant (?) "GuiRoot" as unknown in the addon code line
Code:
FooAddonIndicator:SetAnchor(TOPLEFT, GuiRoot, TOPLEFT, left, top)
so in this line, both "FooAddonIndicator" (defined in the XML file) and "GuiRoot" are flagged.

I have both the addon framework and the api-lua-intellij autocomplete directories in the workspace.libraries search list for the VSCode sumneko.lua extension, but it still won't find "GuiRoot" for some reason.

My apologies if this information is already available somewhere on this forum. I've been reading Baertram's guides, the ESOUI API pages, and also guides on LUA, so I have done my best to teach myself.
  Reply With Quote