CfxLua VSCode extension

CfxLua (FiveM/RedM) IntelliSense

This extension is not authored, published, sponsored, nor endorsed by Cfx.re.

Marketplace
Github

Features

  • Diagnostics, IntelliSense, annotations, and auto-completion provided by sumneko’s Lua Language Server.
  • Support for runtime/environment globals (e.g. CreateThread, promises, json, statebags).
  • Support for FiveM, RedM, and CFX natives.
  • Support for Cfx’s implementation of the Lua language (LuaGLM).
    • Support for vector, quat, and matrix types.
    • Support for safe navigation t?.x?.y == nil.

image
image

Thanks to CitizenFX, gottfriedleibniz, alloc8or, iTexZoz, and TasoOneAsia

Notes

  • Only Lua 5.4 is technically supported by this extension. Some features may cause syntax errors if you are using Lua 5.3.
  • The Lua 5.4 runtime does not support vector unpacking in native arguments - be explicit!
  • Not all vector syntax is supported due to complexity (e.g. swizzling).
  • Separate environments are not supported! Limit your use of globals and try to use unique namespaces.
43 Likes

Very good work!

Linden made me a fivem multi millionaire dodge coin share holder with this extension.

If you downloaded the extension in the past ~hour or so it wasn’t functioning correctly as I didn’t disable the workflow while working on some changes to the repo structure.

Version 1.7.7 is functional again, but I recommend opening your VSCode settings and updating your Lua libraries.

image

Older versions stored libraries at extensionPath\Lua\runtime, extensionPath\Lua\natives\GTAV, etc.
If older paths still exist you can safely remove these in favour of extensionPath\plugin\library\natives\GTAV etc.

Note these may update again in a future update but should not cause any issues.


If you don’t use vscode, note that any editor with support for the Language Server Protocol is supported (such as neovim).

I’ve separated the vscode extension and LLS addon into separate repos - just download fivem-lls-addon and setup the plugin and libraries manually.

3 Likes

Very nice! Good timing too, I was just cleaning up my themes and extensions tonight xD

niceee :slight_smile:

Thank you for you for sharing with us, Great!

I was a alcoholic, abusive, and single father of 9 but as soon as I used this beautiful and exquisite vscode extension I am absolutely flabbergasted. I am now a governor, astronaut, and a self made millionaire. Thank you Linden

1 Like

Truly heartwarming statement here. Linden has affected us in ways no one could imagine. Thank you for telling your tale.

4 Likes

Use it almost daily, prob can’t get any better than this extension.

Welldone steak

Been using this for a little while - simply the best extension, thank you!