[英]Running (lein) REPL in VS CODE
Is there a way to use lein's REPL in VS Code?有没有办法在 VS Code 中使用 lein 的 REPL? I mean, using tasks.js, or something.我的意思是,使用tasks.js 或其他东西。
I wanted an integrated enviroment to run, test and build my clojures applications.我想要一个集成环境来运行、测试和构建我的 clojures 应用程序。 I think maybe I could achieve something like this using vs code, because it has support to third parties compilers.我想也许我可以使用 vs code 来实现这样的东西,因为它支持第三方编译器。 I could use lein run
, but it did not work with lein repl
.我可以使用lein run
,但它不适用于lein repl
。
I've read tasks' documentation, but there's nothing related to REPL.我已经阅读了任务的文档,但没有与 REPL 相关的内容。
Here's the tasks.js code I've used:这是我使用的 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
}
For Clojure and ClojureScript development in VSCode, Calva is the recommended plugin, as it has added a lot of support.对于 VSCode 中的 Clojure 和 ClojureScript 开发, Calva是推荐的插件,因为它增加了很多支持。
There's extension available now which you can use.现在有可用的扩展程序可供您使用。
As the author of Calva I can recommend it.作为Calva的作者,我可以推荐它。 😀 😀
Seriously, at the moment it is supporting interactive programming the best.说真的,目前它最支持交互式编程。 There is a short summary of what it can do in the Editors section of the shadow-cljs
user guide: https://shadow-cljs.github.io/docs/UsersGuide.html#_calva_vs_code在shadow-cljs
用户指南的编辑器部分有一个简短的总结: https : shadow-cljs
I don't believe a real REPL is possible at the moment in VSCode.我认为目前在 VSCode 中不可能实现真正的 REPL。 With that being said, this is currently being worked on over here: https://github.com/Microsoft/vscode/issues/547话虽如此,目前正在此处进行处理: https : //github.com/Microsoft/vscode/issues/547
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.