Skip to content

VSCode Auto Complete

From Wikipedia

Visual Studio Code is a source-code editor developed by Microsoft for Windows, Linux and macOS. It includes support for debugging, embedded Git control and GitHub, syntax highlighting, intelligent code completion, snippets, and code refactoring.

With Visual Studio Code and a couple of plugins we can get auto-complete to work for Garden Paws custom lua methods and variables.

1. Download Visual Studio Code

If you don't have it yet, download and install Visual Studio Code. It's free!

2. Install the Keyring.lua plugin

This plugin allows for auto completion using a snippets json file. We'll replace the snippets.json it provides with the specially made Garden Paws Snippets file.

3. Get the Garden Paws Lua Snippets file.

Right click on this link and select Save As.. to save the snippets file to your computer.

Installing the snippets.

Navigate to "%userprofile%\.vscode\extensions\keyring.lua-0.0.9\snippets". (may have to replace 0.0.9 if a new version releases)

You can copy and paste it to your windows explorer and it should take you there if the version is still the same.

Once you're in the right folder, replace the snippets.json file in the folder with the one you downloaded from here.. (Right click -> Save as)

4. Optional, Install Lua Language Server

Sumneko's Lua Language Server includes Diagnostics, go to definition, find all references and many other useful features for coding in lua.

Comments