Skip to content

Configuring VSCode for Lua Intellisense [WIP]

Hydryad edited this page Jun 9, 2023 · 1 revision

VSCode Overview and Setup

Please feel free to jump in and flesh this out as we go.

What VSCode is

VSCode is a highly extensible code editor that will take on most functions of an IDE with its various extensions. It is open source and it is fully capable of functioning as an IDE for most popular languages.

How do I make VSCode an IDE? What are all these extensions and why is there a "marketplace"?

VSCode is free as in beer, and free as in open source. The source code is maintained under the MIT license here: https://github.com/microsoft/vscode The marketplace is a way to get extensions from within VSCode itself, and for the most part they are free. You can get multiple additional variants of solarized dark theme if the built-in one isn't cutting the mustard.

Basic Setup

Step 1: Download VSCode

You can find the build suitable for your OS here: https://code.visualstudio.com/ After you finish installing it and launch it will have some welcome screens, I highly recommend first time users review the basic tutorials as there are some very useful shortcuts you won't want to miss. If you are accustomed to VI, Emacs, Notepad++, etc. there are hotkey sets for those, hit up google and be amazed.

Step 2: Install extensions

Next up, we want to get a Lua interpreter so we can get some intellisense and autocomplete going. The best one to use at this time is the Lua Language Server AKA LuaLS by sumneko. https://marketplace.visualstudio.com/items?itemName=sumneko.lua

There are several other Lua extensions available, but at the time of this writing (6-8-23) sumneko.lua is your best bet. GitLens is a nice extensions, but if you plan to work on a forked repo I advise just biting the bullet and using the git command line, helpfully integrated into VSCode.

Step 3: ???

If you are interested in contributing or testing changes, you will want to fork the repo and then keep a master branch up to date with the upstream repo. See here for workflows to keep your fork up to date: Github Synching a Fork

Step 4: Profit

To be continued, the API documentation is currently being expanded to provide rich intellisense features.