简体   繁体   English

SublimeSBT无法识别项目

[英]SublimeSBT not recognising project

I've been working on many Scala projects using Eclipse with Scala Plugin, Scala IDE and IntelliJ with Scala plugin but recently I decided to give Sublime Text 3 + SublimeSBT a go due to the slugishness of the IDEs. 我一直在使用带有Scala插件的Eclipse,Scala IDE和带有Scala插件的IntelliJ从事许多Scala项目,但是最近由于IDE的呆滞,我决定让Sublime Text 3 + SublimeSBT成为可能。

My problem is that SublimeText3 doesn't recognise my project as an SBT one. 我的问题是SublimeText3无法将我的项目识别为SBT项目。

  • I downloaded the package using Package Control. 我使用程序包控制下载了程序包。
  • I have tested it on one of my working projects (they both work in Scala IDE and command line SBT). 我已经在我的一个工作项目中对其进行了测试(它们都在Scala IDE和命令行SBT中工作)。
  • Invocation of ctrl+shift+p in SublText doesn't recognise any sbt commands (only SBT: Clear history) SublText中ctrl + shift + p的调用无法识别任何sbt命令(仅SBT:清除历史记录)

I am using Windows 8 x64. 我正在使用Windows 8 x64。

Managed to figure it out. 设法弄清楚了。 For future reference - make sure to include the entire project directory in your sublime text sidebar so that it containes not only .scala files but also build.sbt. 供将来参考-确保将整个项目目录包括在高级文本侧栏中,以使其不仅包含.scala文件,而且还包含build.sbt。 If you include just text files it will treat them as such and not part of the project 如果仅包含文本文件,它将被视为文本文件,而不是项目的一部分

SublimeSBT seems pretty fussy about how you open up the folder project. SublimeSBT对于您如何打开文件夹项目似乎很挑剔。 As you say, you need to make sure that in Sublime you're opening up build.sbt as well as the .scala files. 如您所说,您需要确保在Sublime中打开build.sbt以及.scala文件。 So opening from the root folder of a normally configured project works ok. 因此,从正常配置的项目的根文件夹中打开就可以了。 However, if you open it in sublime from, say, the parent of this root folder, then again SublimeSBT won't recognize it. 但是,如果从该根文件夹的父目录中以sublime的形式打开它,则SublimeSBT仍然无法识别它。 I'd guess (without having tested exhaustively) that build.sbt needs to be one level down from the top folder in sublime. 我猜(没有进行详尽的测试),build.sbt需要比崇高的顶层文件夹低一级。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM