运行 (lein) VS CODE 中的 REPL
Running (lein) REPL in VS CODE
有没有办法在 VS Code 中使用 lein 的 REPL?我的意思是,使用 tasks.js 或其他东西。
我想要一个集成环境来 运行、测试和构建我的 clojures 应用程序。我想也许我可以使用 vs code 实现类似的东西,因为它支持第三方编译器。
我可以使用 lein run
,但它不适用于 lein repl
。
我已经阅读了任务的文档,但没有任何内容与 REPL 相关。
这是我使用的 tasks.js 代码:
{
// See http://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "lein",
"tasks":
[
{
"taskName": "run",
"showOutput": "always",
"args": ["run"],
"isBuildCommand": true,
"isWatching": false
},
{
"taskName": "repl",
"showOutput": "always",
"args": ["repl"],
"isWatching": true
}
],
"isShellCommand": true
}
我认为 VSCode 目前不可能有真正的 REPL。
话虽如此,目前正在这里进行:https://github.com/Microsoft/vscode/issues/547
已更新(2021 年 7 月)
对于VSCode中的Clojure和ClojureScript开发,Calva是推荐的插件,因为它增加了很多支持。
原始答案 (2016)
现在有可用的扩展程序供您使用。
作为 Calva 的作者,我可以推荐它。
说真的,目前它支持交互式编程是最好的。在 shadow-cljs
用户指南的编辑部分有一个关于它可以做什么的简短总结:https://shadow-cljs.github.io/docs/UsersGuide.html#_calva_vs_code
有没有办法在 VS Code 中使用 lein 的 REPL?我的意思是,使用 tasks.js 或其他东西。
我想要一个集成环境来 运行、测试和构建我的 clojures 应用程序。我想也许我可以使用 vs code 实现类似的东西,因为它支持第三方编译器。
我可以使用 lein run
,但它不适用于 lein repl
。
我已经阅读了任务的文档,但没有任何内容与 REPL 相关。
这是我使用的 tasks.js 代码:
{
// See http://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "lein",
"tasks":
[
{
"taskName": "run",
"showOutput": "always",
"args": ["run"],
"isBuildCommand": true,
"isWatching": false
},
{
"taskName": "repl",
"showOutput": "always",
"args": ["repl"],
"isWatching": true
}
],
"isShellCommand": true
}
我认为 VSCode 目前不可能有真正的 REPL。 话虽如此,目前正在这里进行:https://github.com/Microsoft/vscode/issues/547
已更新(2021 年 7 月)
对于VSCode中的Clojure和ClojureScript开发,Calva是推荐的插件,因为它增加了很多支持。
原始答案 (2016)
现在有可用的扩展程序供您使用。
作为 Calva 的作者,我可以推荐它。
说真的,目前它支持交互式编程是最好的。在 shadow-cljs
用户指南的编辑部分有一个关于它可以做什么的简短总结:https://shadow-cljs.github.io/docs/UsersGuide.html#_calva_vs_code