VS Code extension for redscript, client for the redscript IDE.
This extension can be installed from the VSCode marketplace.
To complete the setup, you need to provide the game installation path in preferences:
- error and warning diagnostics
- autocompletion for methods and fields
- hover for function definitions and types
- go-to-definition
- bonus: limited support for redmod (scripted functions)
- formatting (beta)
- debugger (requires redscript-dap)
- hooks for external tools
The language server will attempt to load a TOML file named .redscript-ide
from every workspace folder.
This file can contain some configuration options:
redscript_dir
maps the source directory to a different folder than the workspace folder roothooks
allows you to configure hooks on certain events, an example would be creating a file to signal something to an external tool- for instance, you can trigger a reload of RedHotTools when the workspace successfully typechecks:
[[hooks.successful_check]] # you can use {game_dir} to refer to the game directory if it's configured for the extension, # another available variable is {workspace_dir} which refers to the workspace directory that contains the checked file create_file = "{game_dir}\\red4ext\\plugins\\RedHotTools\\.hot-scripts"
- for instance, you can trigger a reload of RedHotTools when the workspace successfully typechecks: