Installing IntelliJ and EmmyLua
Main Table of Contents
ESOUI Mod Documentation
Localized Suplimental Documentation
Contents
2.1 - Authors
Baertram wrote this and the conversion for the site was done by Sharlikran.
2.2 - Intent
This will help you set up IntelliJ to work with Lua and ESO mods.
2.3 - Install steps
You need to install the plugin EmmyLUA. It provides lua support for CTRL+
And you can use this forum thread with my last post to include the auto completion of esoui variables and functions.
Autocompletion files for IntelliJ IDEA, API100031 Greymoor
You need to start IntelliJ, and then click in the menu "File" -> Project structure
• Click on Platform settings -> SDK (1)
• Then on the + (2) and add something like ESOUI lua as description (3)
• Click on the + (4) to add a folder where you have extracted the zip archive I've linked you above (the dropbox link with the IntelliJ IDEA ESOUI autocompletion files)
• It will show in the lines at (5) then
Save the project structure and you are able to open your AddOns with IntelliJ and use this project structure on them. There is a setting to always use this project with lua files I think, somewhere in the settings
Open the menu "File"->"Settings" and click on plugins
Search for Emmy and install EmmyLua
After you have installed the plugin and the project stuff above open the menu "File" and click on "Invalidate caches and restart"
This will make the auto completion work in 99% of the cases within .lua files
If you create a new project choose the "esoui lua" project you have added as project structure and your project will look like this:
At top the lua files and xml and txt of your project and at the bottom the "External libraries" with the autocompletion etc.
And with the emmylua plugin you should be able to use simply code completions for standard lua like for ... do end loops and so on.
It will show you at the right scroll bar the yellow points (warnings about global leaking variables, unused variables etc.) and red points where there are errors.
Mouse over them to see what the problem is.
If you want to run lua code within IntelliJ you need lua.exe installed in your windows path somewhere. I do not use it though as I only test esoui related stuff, ingame.
The autocompletion for standard lua functions like print() works as well:
It uses lua 5.3 though as it seems
You are able to change this in the menu file -> settings -> Languages and frameworks -> EmmyLUA:
And in the menu "Run" you can configure how and where the lua.exe file is located that should be used to run your scripts
Not quite sure how to setup this to be reused for ALL lua files though. Currently it looks like it only uses the current chosen file for its default configuration.
Seems the wrench icon at the top line is able to preset the templates:
Works this way then
Just preset the template for lua and delete any "per file created configuration" as you try to run it. It will use the template configuration then and just use the lua 5.1 exe file to compile it.