Type ext install vscode-swbf2-lua-api to find the extension
Click the Install button, then the Enable button
OR
Press Ctrl+Shift+X to open the Extensions tab
Type vscode-swbf2-lua-api to find the extension
Click the Install button, then the Enable button
OR
Open a command-line prompt
Run code --install-extension aarongilbert2012.vscode-swbf2-lua-api
Features
This extension includes snippets for virtually every single built-in Lua function in Star Wars Battlefront II (2005). The only ones that are currently undocumented are many of the shell-exclusive callbacks, but there is pretty much no use for those anyway.
Currently included
IntelliSense-like function auto-completion.
Each function includes a description of what it does - some include thorough use-case examples.
Functions with parameters include auto-completion for each parameter.
Parameters with predetermined values have dropdown-based value auto-fill.
Functions with multiple return values include descriptions of each return value.
Snippets for all event callbacks (such as OnCharacterSpawn) - furthermore, each snippet includes auto-completion that sets up the callback's lambda function (e.g., 'function(object, killer)' for 'OnObjectKill') and instance values.
Not yet included
Parameter descriptions - this is largely because VSCode does not yet seem to support individual parameter descriptions.
Requirements
There are no explicit requirements or dependencies for this extension, but obviously it is only useful for SWBF2 modders. ;-)