FiveM natives Snippets/Completions script (auto-update)

Hello, I’m sharing with you a small script that generate snippets/completions files for Sublime Text 3, Visual Studio Code or Atom. You can generate your own file with the latest update of the FiveM’s natives repository.

Source code

You can find the NodeJS script below and generate your own completion file.

Direct download

Help

  • To install Sublime Text 3 completions: Preferences > Browse Packages… and drop the file here.
  • To install VSCode snippets: File > Preferences > User snippets > new global snippet… and drop the file here.
  • To install Atom snippets: Atom > Open your snippets > put the content of the file here / or put the file here: %User%/.atom/Packages
8 Likes

Awesome. iirc something already exists for np++ before users ask!

i dont get how to install it for VS. “File-Preferences” doesnt exist for me. pls help

What do you have then?

Nice! Great job!

Can you double check the snippets.cson file? I think there are multiple duplicated entries in it. Every time I load them in Atom, it throws errors saying there are “duplicate keys”.

how to install and use it?

In VSCode, you want to use the lua.json one.
Under File --> Preferences --> User Snippets it will ask you for which language you want it and you type in lua. This will open the editor’s lua.json in which you paste the contents of the lua.json provided in a release of this github repository.

1 Like

I forgot to mention that I use sublime, but thanks, I found here how to use it, I need to put it inside the “AppData\Roaming\Sublime Text 3\Packages\User” and then create a .lua file to use, done

As I have already mentioned in another topic, I re-generated all of the natives, all of the newest files are here: https://jonbird.ca/fivem-snippets/

Make a new topic for this in the releases area.

Update https://github.com/PichotM/fivem-natives-completions/releases/tag/1.0.3

Hello! How do we update the completions ? I’m using sublimetext.

Thanks!