VSCode extension for Red
An extension with rich support for the Red language, with features including the following and more:
- hint all syntax errors
- auto completion
- goto definition
- navigate to any symbol definition
- hover to view signatures
- Interpret or compile Red source file
- Install the extension
- Install Red (Note: For Windows user, need to run
red.exe --cli
)
Note: latest automated build version should be installed for 0.3.x
, and this extension not worked with last stable version
-
Turn off the Auto Completion
You can turn off the autocompletion in the User or Workspace Settings file (settings.json) as follows.
"red.autocomplete": false
For compiling Red source file, you need to configure the path to the Red toolchain in the User or Workspace Settings file (settings.json) as follows.
"red.redPath": "/home/user1/tools/red-latest"
For Windows user: c:/work/red/red.exe
or c:\\work\\red\\red.exe
or c:\work\red\red.exe
will all be accepted.
You can also configure the directory for output files of the compiler. The current work space (project) directory is used by default.
(Note: If no work space directory, the output files are in the same folder as the Red source file.)
"red.buildDir": "/home/user1/debug"
If you are using Linux and prefer to use the Windows version of Red through Wine until GUI support is available for Linux, you can point red.redPath
to a small shell script.
Key | Command | Command id |
---|---|---|
F6 | Interpret Current Red File | red.interpret |
Ctrl+F6 | Interpret Current Red File(GUI) | red.interpretGUI |
F7 | Compile Current Red File | red.compile |
Ctrl+K Ctrl+M | Show Red Command Menu | red.commandMenu |
The following Visual Studio Code settings are available for the Red extension. These can be set in user preferences or workspace settings.
{
// Path to Red toolchain
"red.redPath": "",
// Directory to put compiling result of Red Source file.
"red.buildDir": "",
// Whether to enable or disable autocompletion.
"red.autoComplete": true
}
The following commands are available for the Red extension. These can be associated with keyboard shortcuts via the keybindings.json
file.
- To configure keyboard shortcuts the way you want, go to the menu under File > Preferences > Keyboard Shortcuts. (Code > Preferences > Keyboard Shortcuts on Mac)
[
{ "key": "f6", "command": "red.interpret" },
{ "key": "ctrl+f6", "command": "red.interpretGUI" },
{ "key": "f7", "command": "red.compile" },
{ "key": "ctrl+k ctrl+m", "command": "red.commandMenu" },
]
- diagnostics
- auto completion
- goto definition
- navigate to any symbol definition
- hover to view signatures
- Interpret or compile Red source file
- old Screenshots
- Contributions are always welcome. Fork it, modify it and create a pull request.
- Details on contributing can be found here
- Any and all feedback is appreciated and welcome.
- Please feel free to add suggestions here
Github