Benjamin-Dobell / IntelliJ-Luanalysis

Type-safe Lua IDE — IntelliJ IDEA plugin
Apache License 2.0
155 stars 21 forks source link

FiveM support #133

Open fivaz opened 2 years ago

fivaz commented 2 years ago

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

Xseba360 commented 2 years ago

@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 commented 2 years ago

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:

Damen57 commented 11 months ago

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:

i had issues with phpstorm crashing during indexing with this unfortunately :(