[Release] FiveM Natives - Snippets/Completions for Sublime Text, VS Code, Atom, & Notepad++

dev
development
scripting
developers

#1

This release gives you access to snippets and completions for several editors including Sublime Text, Visual Studio Code, Atom, and Notepad++. It supports both GTA’s native methods and the ones FiveM adds. Functions found in scheduler.lua, natives_server.lua, and natives_universal.lua are all included.

I’m open to suggestions on any other editors to implement autocompletions for. Furthermore, if there are any problems with the files provided here, feel free to let me know.

Downloads

Sublime Text
Visual Studio Code
Atom
Notepad++

Preview

FiveM Snippets Sublime Text
FiveM Snippets VS Code

Installation

  • Sublime Text: drop the fivem.sublime-completions into %AppData%/Sublime Text 3/Packages
  • Visual Studio Code: drop the lua.json into %AppData%/Code/User/snippets
  • Atom: drop the snippets.cson into %UserProfile%/.atom/Packages
  • Notepad++: drop the lua.xml into %ProgramFiles%/Notepad++\plugins\APIs (dependent on install location)

Readme files are provided which go into more detail if required.

Source Code

The script that generates these snippets is available for viewing at the following repository:


Want to learn Lua
(Adobe Brackets) Lua Native Autocomplete
#2

Is it possible to do such a wonderfull stuff for Notepad++? Thanks for a great work btw :slight_smile:


#3

it already exists, use the search function :slight_smile:


#4

I’ve been looking into doing it for Notepad++, I’ll upload it once finished.

Edit: support is now added.


#5

I am aware of the existing Sublime Text and VS Code snippets (not any for Atom). However, they are outdated by several months at this point and they only include the natives from native db - not the CitizenFX ones.

I’ve created a script that parses the functions from a Lua script file and automatically generates these snippets, so I plan to keep these up to date. I’ll be throwing the script up on GitHub later on so others can extend it if they so choose.

In addition, I’m going to continue creating snippets for other editors as requested.


#6

This is honestly so amazing, that you for this!


#7

Great work man! I appreciate people that do things like this for the community.


#8

Thank you! Was looking to get started on my own Atom version, but you did it! Thanks :slight_smile:


#9

This is awesome!
PS: If anyone uses LuaExtended on Sublime Text 3 (like I do), just change source.lua to source.luae in the fivem.sublime-completions file.


#10

Update: Notepad++ support is now added!

Download and install instructions available in the original post.


#11

<3 nice release thanks


#12

apparently my “response” thingy didn’t show, i was telling that to the guy aboth me who asked for a NP++ version since that already exists.


#13

Like it

Thanks you :slight_smile:


#14

Sadly all links are dead :frowning: Would you please re-upload them ? I love Atom and I want to code with it. Thx


#15

Bluethefurry was talking about this one that already existed: [Dev Tool / Release] Lua Native Function Code Hints in Notepad++ (v2.0) which is definitely not outdated…

If you’re looking for a Notepad++ version you could also use the link from above.


#16

My bad, links are now fixed.


#17

Does this still work in Atom for anyone else? I had it working once, but after a restart it seems to not work at all.


#18

Simple fix boi, use sublime :wink:


#19

No one asked you for your shit opinion @IllusiveTea :stuck_out_tongue:

Also, I fixed it by putting the snippets into Atom’s snippet file rather than a separate one.


#20

Is it possible to do such a wonderfull stuff for IntelliJ ? Thanks for a great work btw :slight_smile: