在VSCODE中的项目中共享共同的帮助脚本

发布于 2025-02-07 17:17:14 字数 809 浏览 3 评论 0原文

我有一些我希望在每个项目中都能使用的实用程序功能,片段和划痕。
目前,我对Clojure Projects和Intellij Idea/Cursive进行了以下设置:

  • 我在.lein中定义了一个用户配置文件,我在其中指向
  • 我在Idea/Cursive中同步和运行REPL的source Paths,我检查了:选择用户配置文件(默认情况下)
  • 草书显示了项目窗格中的项目文件和公共文件(即刮擦文件夹),
  • 我可以在Real Project Files和我的本地Helers/ScratchPads中无缝编辑和评估。

有没有办法在VScode中实现此行为?

注意:

  • 我在草书中设置的Clojure设置仅用于说明目的。我想找到一种在其他脚本语言中获得类似功能的方法(即Python,Groovy)。因此,理想情况下,我不想将Leiningen使用为此,而是找到一种通用方法来将通用源文件夹添加到VS Code Explorer Pane中。
  • 我知道,有了多根工作空间,我可以实现自己想要的东西,但是每个项目都必须手动完成。如果我的文件夹带有常见的utils自动添加到每个工作区,那就更好了。像默认工作区模板之类的东西可以解决此问题,但是我找不到类似的东西。我想念什么吗?

I have a few utility functions, snippets and scratches that I want to be able to use in every project.
Currently I have the following setup for Clojure projects and Intellij IDEA/Cursive:

  • I have a user profile defined in .lein, where I have source-paths pointing to
  • when I sync and run REPL for project in IDEA/Cursive, I check that :user profile is selected (it is the default)
  • Cursive shows both project files and common files (i.e. scratches folder) in project pane
  • I can edit and eval in REPL real project files and my local helers/scratchpads seamlessly.

Is there a way to achieve this behaviour in VSCode?

Notes:

  • My clojure setup in Cursive is for illustration purposes only. I would like to find a way to get similar feature in other scripting languages (i.e. python, groovy). So ideally I don't want to use leiningen for that, but rather find a generic way to add common source folder to VS code Explorer pane.
  • I know that with multi-root workspaces I can achieve what I want, but it must be done manually per project. It would be much better if my folder with common utils was added to every workspace automatically. Something like a default workspace template would solve this, but I couldn't find anything similar. Am I missing something?

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文