IntelliJ-Luanalysis icon indicating copy to clipboard operation
IntelliJ-Luanalysis copied to clipboard

FiveM support

Open fivaz opened this issue 2 years ago • 3 comments

Many people use Lua to code FiveM mods, it would be cool to have some support for FiveM global functions in Lua

fivaz avatar Jul 30 '22 17:07 fivaz

@fivaz Check these definitions out: https://github.com/Xseba360/fivem-lua-docs

Feel free to use them in your project, let me know if you do. Side note: If you use the JOAAT Hash literal (backticks):

local hash = `WEAPON_PISTOL`

the whole thing just breaks and stops processing code.

Xseba360 avatar Sep 04 '22 00:09 Xseba360

I have added support for the hash literal in a forked repository:

https://github.com/Xseba360/IntelliJ-Luanalysis/tree/fivem (build artifacts here)

I don't know if there's a better way to implement this for now, but it's all I was able to figure out with my close-to-zero Java/Kotlin knowledge.

Unless @Benjamin-Dobell plans to implement game/application specific syntaxes behind a plugin setting, it will have to stay in a fork.

For example, issue #109 has been left pretty much unanswered and AFAIK issue #91 has been pretty much untouched since April, so I don't predict any changes regarding this matter 😥.

I checked EmmyLua issues and it seems no one has any plans for implementing FiveM-specific backtick syntax there:

  • https://github.com/EmmyLua/IntelliJ-EmmyLua/issues/345
  • https://github.com/EmmyLua/IntelliJ-EmmyLua/issues/377
  • https://github.com/EmmyLua/IntelliJ-EmmyLua/issues/452#issuecomment-1022232281

Xseba360 avatar Oct 08 '22 15:10 Xseba360