first-class lua editor Emmylua, Welcome to the face

Official documents   https://emmylua.github.io/zh_CN/

github      https://github.com/EmmyLua/IntelliJ-EmmyLua

1. install IntelliJ IDEA Community Edition 2018.2.4 x64

Official website address  http://www.jetbrains.com/idea/download/#section=windows

Download it directly , download  Community edition , The community version , franco

This was originally written java Of , During the installation process, some options can be ignored directly

2. download Lua For Windows

https://github.com/rjpcomputing/luaforwindows/releases

Just download the latest , Then install

3. install emmylua plug-in unit

The installation plug-ins are 2 Methods , I installed it with the plug-in library that I searched directly , Other methods , Refer to official documents

* Open settings panel.


* Select plugins and click Browse repositories


* search  EmmyLua  And click  Install  install


* Restart after installation IDEA
4. set up lua engineering

Create an empty project , In order to set it after entering



Choose your Lua Project root directory

5. read lua file , ignore meta file

So is it settings,xlua What needs to be read txt, It can be set by yourself , It doesn't need to be set



  Here's a list of ignored files , There is no picture , It says *.meta; that will do

6. White interface, too hot eyes , Adjust to black

File---settings



7. The font is too small

File---settings



8. add to unity Of api Tips

File---Project Structure



spot plus Button



find unity Of  UnityEngine.dll this

I used it unity 2018 Position in  D:\Unity2018\Editor\Data\Managed 

Different unity The file location of the version is different

( This kind of addition dll, There will be a corresponding code prompt , Feeling added fairygui Of dll There can be fairygui Code tips for )

9. ignore case , To call api The prompt is convenient

File---settings Cancel the red circle position

 

10. Using annotations

For example, write the following code

local go;

And then in this line of code , Press alt plus enter key

There will be one create type annotation One option , Return again

You can give it go Named the type , Direct input gameobject There will be an automatic prompt below UnityEngine.GameObject type , Select it

So this one go namely UnityEngine.GameObject Type

then go. You can point it out unity Of api The method

The annotation function is emmylua A very powerful feature , For more tips, please refer to the official website

11. other

① global search

ctrl shift f Note that the shortcut key does not conflict

perhaps edit---find---find in path

Or refer to this  https://blog.csdn.net/gnail_oug/article/details/78281354

② Organize code format

code---reformat code

Code needs to be selected  

ctrl + alt + L

 ③ View the specific implementation of the method

alt Hold on , Then click the mouse method

④ See where the method is called

alt+F7

⑤ Code folding and recovery

ctrl  shift -

ctrl  shift +

⑥ Remove wavy lines , Spelling check

file-settings-editor-inspections

Input in the input box spelling-typo This is off that will do