red / Vscode Extension
Programming Languages
Labels
Projects that are alternatives of or similar to Vscode Extension
Red
VSCode extension forAn 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
Quick Start
1. Install the extension
Red
2. InstallNote:
- For Windows user, need to run
red.exe --cli
- latest automated build version should be installed for
0.4.x
, and this extension not worked with last stable version
3. Turn on/off the intelligence feature
You can turn on/off the intelligence feature in the User or Workspace Settings file (settings.json) as follows.
For Example, turn off it:
"red.intelligence": false
That's all.
If you want to compile the source file, do the following settings.
Specify the full path of the red toolchain
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.
Specify the output folder
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.
Shortcuts
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 |
Configurations
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 intelligence.
"red.intelligence": 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" },
]
Feature Screenshots
- diagnostics
- auto completion
- goto definition
- navigate to any symbol definition
- hover to view signatures
- Interpret or compile Red source file
Issues, Feature Requests and Contributions
- 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
Source
Github