> For the complete documentation index, see [llms.txt](https://solaartw.gitbook.io/developer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://solaartw.gitbook.io/developer/documentation/utilities/cyberpunk-engine-tweaks/guides/vs-code.md).

# VS Code

<figure><img src="https://820263885-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MP5jWcLZLbbbzO-_ua1%2F-MdsIwkqtzkin4UhMUcO%2F-MdsJJfMVIeKrIcmoUiX%2Fcet-vscode-demo-115.gif?alt=media&#x26;token=0a549402-78de-4e5c-9436-0a6e464aa246" alt=""><figcaption></figcaption></figure>

## Installation <a href="#installation" id="installation"></a>

1. Download and extract the [Cyber Engine Tweaks Lua Lib](https://github.com/psiberx/cp2077-cet-typedefs/releases/download/v211124/cet-lua-b-1.18.0-211124.zip).
2. Install the [Lua by sumneko](https://marketplace.visualstudio.com/items?itemName=sumneko.lua) extension.
3. Add next settings to the `.vscode\settings.json` or in the Settings GUI:{"Lua.runtime.version": "LuaJIT","Lua.workspace.preloadFileSize": 15360,"Lua.workspace.library": \["c:\\\path\\\to\\\cet-lua-lib"]}
4. On first use it takes a couple of minutes to parse and cache all definitions.Unfortunately there is no visual indication of this process.When it's done the code assistance will be more responsive.

## Features <a href="#features" id="features"></a>

* Code completion for built-in Cyber Engine Tweaks and Cyberpunk 2077 types and functions (except ImGui and sqlite)
* Type resolving for `Game.GetScriptableSystemsContainer():Get("Type")`, `NewObject("Type")`, and `GetSingleton("Type")`
* Contextual suggestions for default values and predefined sets

## Annotations <a href="#annotations" id="annotations"></a>

### **Callback parameters**

You can specify the type of the parameters with `@param` annotation. It's very handy for `Observe` and `Override`:---\@param request PerformFastTravelRequestObserve("FastTravelSystem", "OnPerformFastTravelRequest", function(request)-- Now request object has type and suitable for code completionend)

<figure><img src="https://820263885-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MP5jWcLZLbbbzO-_ua1%2F-MdsIwkqtzkin4UhMUcO%2F-MdsJTbtYaGgYVI-4NpG%2Fcet-vscode-param.png?alt=media&#x26;token=71706c04-e183-4cf1-96d3-32f3cbade863" alt=""><figcaption></figcaption></figure>

### **Unresolved type**

If type of some variable cannot be resolved or ambiguous you can force the type with `@type` annotation:---\@type ScriptedPuppetlocal puppet

### **Generic functions**

The type of the result of some functions depends on the parameters passed to the function. If a valid type name is passed as a parameter, then the resulting type must be resolved without custom annotations.
