Robot Framework language support for Zed using RobotCode.
- Syntax highlighting (tree-sitter + semantic tokens)
- Diagnostics and linting
- Code formatting
- Hover documentation
- Go to definition
- Find references
- Rename/refactoring
- Keyword completion
- Signature help
- Code actions
- Document outline
- Code snippets
- Bracket matching and auto-close
Install the extension from Zed's extension marketplace (Cmd+Shift+X, search
"Robot Framework").
- Python >= 3.10
- Robot Framework >= 5.0
Install RobotCode with language server support:
pip install robotcode[languageserver]Verify the installation:
robotcode --versionRobotCode settings can be
passed via Zed's settings.json:
{
"lsp": {
"robotcode": {
"settings": {
"robotcode": {
"robot": {
"pythonPath": "/path/to/python"
}
}
}
}
}
}The extension includes snippets for common Robot Framework patterns. Snippets support tab navigation, mirrored placeholders, selectable choices, and proper Robot Framework variable escaping.
| Prefix | Description |
|---|---|
libas |
Import a library with an alias |
res |
Import a resource file |
vars |
Import a variables file |
| Prefix | Description |
|---|---|
ssetup |
Suite setup |
steardown |
Suite teardown |
tsetup |
Test setup |
tteardown |
Test teardown |
doc |
Documentation setting |
tags |
Tags setting |
args |
Arguments setting |
ret |
Return from a keyword |
| Prefix | Description |
|---|---|
logc |
Log a message to console |
logv |
Log a variable to console |
| Prefix | Description |
|---|---|
kwdoc |
Keyword with documentation |
kwargs |
Keyword with documentation and arguments |
kwfull |
Keyword with documentation, arguments, and tags |
| Prefix | Description |
|---|---|
tcdoc |
Test case with documentation |
tcfull |
Test case with documentation and tags |
| Prefix | Description |
|---|---|
setv |
Set scalar variable |
list |
Create list variable |
dict |
Create dictionary variable |
setsuite |
Set suite variable |
settest |
Set test variable |
setlocal |
Set local variable |
| Prefix | Description |
|---|---|
forin |
FOR ... IN loop |
forrange |
FOR ... IN RANGE loop |
forenum |
FOR ... IN ENUMERATE loop |
while |
WHILE loop |
if |
IF block |
ife |
IF / ELSE block |
ifei |
IF / ELSE IF / ELSE block |
ifi |
Inline IF statement |
| Prefix | Description |
|---|---|
try |
TRY / EXCEPT block |
trye |
TRY / EXCEPT / ELSE block |
tryf |
TRY / EXCEPT / FINALLY block |
tryef |
TRY / EXCEPT / ELSE / FINALLY block |
| Prefix | Description |
|---|---|
should |
Common assertion (selectable) |
rkars |
Run keyword and return status |
rkaie |
Run keyword and ignore error |
waitkw |
Wait until keyword succeeds |
If RobotCode is restarted, .robot or .resource files that were already open
will stop receiving LSP features (diagnostics, formatting, hover, completions,
etc.). Newly opened files work normally.
Cause: Zed does not re-send textDocument/didOpen for already-open buffers
after a language server restart. RobotCode correctly ignores requests for
documents it hasn't received a didOpen notification for.
Workaround: Close and reopen affected files, or restart Zed.
Reload the extension after making changes:
Cmd+Shift+P → zed: reload extensions
Build manually:
cargo build --target wasm32-wasip2MIT