Skip to content

Commit f4025fb

Browse files
committed
feat(vscode): introduce RobotCode: Start Terminal REPL command for launching the interactive Robot Framework interpreter directly from VSCode
1 parent be386d2 commit f4025fb

11 files changed

+2933
-87
lines changed

.vscode/launch.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
"CMD_VAR_LONG": "long",
3131
},
3232
"args": [
33-
"--verbose",
34-
"--format",
35-
"toml",
33+
// "--verbose",
34+
// "--format",
35+
// "toml",
3636
// "robot"
3737
// "debug-launch",
3838
// "--pipe-server",
@@ -54,8 +54,13 @@
5454
// "discover",
5555
// "files",
5656
// ".."
57-
"config",
58-
"show",
57+
// "config",
58+
// "show",
59+
"repl",
60+
"-d", "output",
61+
"-i",
62+
"-v", "CMD_LINE_VAR:cmd_line_var",
63+
// "E:\\source\\uvtestprj\\tests\\first.robotrepl"
5964
]
6065
},
6166
{

package-lock.json

Lines changed: 63 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
"Behavior Driven Testing",
4545
"BDT",
4646
"Robotic Process Automation",
47-
"RPA"
47+
"RPA",
48+
"notebookKernelRobotframeworkRepl"
4849
],
4950
"featureFlags": {
5051
"usingNewInterpreterStorage": true
@@ -64,7 +65,8 @@
6465
"onDebug",
6566
"onDebugResolve:robotcode",
6667
"onDebugInitialConfigurations",
67-
"onDebugDynamicConfigurations:robotcode"
68+
"onDebugDynamicConfigurations:robotcode",
69+
"onNotebook:robotframework-repl"
6870
],
6971
"galleryBanner": {
7072
"theme": "dark",
@@ -81,6 +83,17 @@
8183
],
8284
"main": "./out/extension.js",
8385
"contributes": {
86+
"notebooks": [
87+
{
88+
"type": "robotframework-repl",
89+
"displayName": "RobotFramework REPL",
90+
"selector": [
91+
{
92+
"filenamePattern": "*.robotnb"
93+
}
94+
]
95+
}
96+
],
8497
"markdown.markdownItPlugins": true,
8598
"icons": {
8699
"robotcode-robot": {
@@ -381,6 +394,21 @@
381394
],
382395
"configuration": "./language-configuration.json"
383396
},
397+
{
398+
"id": "robotframework-repl",
399+
"aliases": [
400+
"Robot Framework REPL",
401+
"robotframework repl"
402+
],
403+
"icon": {
404+
"light": "./icons/robot-light.png",
405+
"dark": "./icons/robot-dark.png"
406+
},
407+
"extensions": [
408+
".robotrepl"
409+
],
410+
"configuration": "./language-configuration.json"
411+
},
384412
{
385413
"id": "robotframework-injection"
386414
}
@@ -399,6 +427,19 @@
399427
"comment"
400428
]
401429
},
430+
{
431+
"language": "robotframework-repl",
432+
"scopeName": "source.robotframework-repl",
433+
"path": "./syntaxes/robotframework-repl.tmLanguage.json",
434+
"tokenTypes": {
435+
"string.unquoted.argument.robotframework": "other",
436+
"variable.expression.robotframework": "other"
437+
},
438+
"unbalancedBracketScopes": [
439+
"comment.robotframework",
440+
"comment"
441+
]
442+
},
402443
{
403444
"language": "robotframework-injection",
404445
"scopeName": "markdown.robotframework.codeblock",
@@ -1016,6 +1057,11 @@
10161057
"category": "RobotCode",
10171058
"command": "robotcode.restartLanguageServers"
10181059
},
1060+
{
1061+
"title": "Start Terminal REPL",
1062+
"category": "RobotCode",
1063+
"command": "robotcode.startTerminalRepl"
1064+
},
10191065
{
10201066
"title": "Disable RoboCop",
10211067
"category": "RobotCode",
@@ -1635,16 +1681,16 @@
16351681
"vscode-languageclient": "^9.0.1"
16361682
},
16371683
"devDependencies": {
1638-
"@eslint/compat": "^1.1.1",
1684+
"@eslint/compat": "^1.2.0",
16391685
"@eslint/eslintrc": "^3.1.0",
1640-
"@eslint/js": "^9.11.1",
1686+
"@eslint/js": "^9.12.0",
16411687
"@types/fs-extra": "^11.0.4",
16421688
"@types/node": "^22.7.2",
16431689
"@types/vscode": "^1.86.0",
16441690
"@vscode/test-electron": "^2.4.1",
16451691
"@vscode/vsce": "^3.1.1",
16461692
"esbuild": "^0.24.0",
1647-
"eslint": "^9.11.1",
1693+
"eslint": "^9.12.0",
16481694
"eslint-config-prettier": "^9.1.0",
16491695
"eslint-plugin-prettier": "^5.2.1",
16501696
"globals": "^15.10.0",
@@ -1657,4 +1703,4 @@
16571703
"workspaces": [
16581704
"docs"
16591705
]
1660-
}
1706+
}

0 commit comments

Comments
 (0)