Quantcast
Intellisense ESOUI for VS Code - ESOUI
Thread Tools Display Modes
10/04/21, 02:29 AM   #1
xenopyax
Join Date: Jan 2020
Posts: 4
Intellisense ESOUI for VS Code

Hey,

So I've set up intellisense for coding addons so far, but it can't seem to find the event when I register them, for example EVENT_ADD_ON_LOADED shows up with a yellow underline telling me "Undefined global `EVENT_ADD_ON_LOADED`.Lua Diagnostics.(undefined-global)" how do I fix this?
  Reply With Quote
10/04/21, 02:43 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 3,749
Moved your thread to the "Dev tools" forum, as the forum where you have posted is about addons.

btw: Without giving more info/details about how you have setup intellisense (to use the esoui lua files? you created your own lua files? what did you do to make that tool find the event and where is the event info stored? What lua files do you use? Do you use the txt file of the ESOUI_Documentation_Pxx.txt directly?, etc.) I guess there won't be someone who is able give you help

I do not know intellisense, so I might be wrong here. But other IDEs need you to install a lua plugin for the lua syntax highlighting etc. And then provide *.lua files containing the API functions, globals, etc.

Like IntelliJ IDEA is doing it, described here:
https://www.esoui.com/downloads/info...cessearch.html

Others:
https://www.esoui.com/forums/showthread.php?t=9875

Last edited by Baertram : 10/04/21 at 02:46 AM.
  Reply With Quote
10/04/21, 03:00 AM   #3
xenopyax
Join Date: Jan 2020
Posts: 4
Oh sorry and thanks for moving this!

So I've download the files from the esoui repo https://github.com/esoui/esoui then I downloaded a lua plugin for VS Code https://marketplace.visualstudio.com...me=sumneko.lua and under the Lua -> Workspace: Library I pointed it to the root folder of the downloaded files
  Reply With Quote
10/04/21, 04:41 AM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 3,749
If this is about Visual Studio chekc out the last post of mine, this link:
https://www.esoui.com/forums/showthread.php?t=9875

At the bottom is a VS eso framework (Visual Studio addon framework) mentioned, which provides autocomplete (intellisense) and other helpers.
Maybe this is what you want to achieve?
You can check which lua plugin is used there and what teh Wiki says how to setup the esoui documentation *.lua and *.xml file include.
  Reply With Quote
10/04/21, 05:09 AM   #5
xenopyax
Join Date: Jan 2020
Posts: 4
Hey,

yeah I've already checked that out but seems to be some completely different from what is explained in this tutorial https://wiki.esoui.com/Writing_your_first_addon

I already have this setup only problem is it can't see event the rest works like a charm I can see things like EVENT_MANAGER:RegisterForEvent but just the events aren't recognized I guess I'll try another IDE if this sadly doesn't work.
  Reply With Quote
10/04/21, 05:13 AM   #6
xenopyax
Join Date: Jan 2020
Posts: 4
Oh nvm just tried it for the lols, and it worked instead of using the esoui files from their repo I used these https://www.esoui.com/downloads/info...cessearch.html as the workspace library, and it worked! Thank you!
  Reply With Quote
10/04/21, 07:51 AM   #7
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 3,749
I guess the events EVENT_* constants are not defined anywhere in the official source code and it thus does not find it properly then.
Glad it worked for you with the other generated files, where they are defined as functions to let auto-completion recognize and find them:

Code:
--- @param addonName string
--- @return void
function EVENT_ADD_ON_LOADED (eventId, addonName) end
  Reply With Quote

ESOUI » Developer Discussions » Dev Tools » Intellisense ESOUI for VS Code

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off