-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add VSCode settings for the dotty project #2750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
227a102
bd84d36
151d6b1
351b10c
37b18f5
1e479be
cd2dbf3
1f4fb2b
1fdb0e6
caa6186
eda5730
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Place your settings in this file to overwrite default and user settings. | ||
{ | ||
"editor.tabSize": 2, | ||
"editor.insertSpaces": true, | ||
|
||
"files.trimTrailingWhitespace": true, | ||
|
||
"search.exclude": { | ||
"**/*.class": true, | ||
"**/*.hasTasty": true | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -250,7 +250,7 @@ object Build { | |
settings(commonNonBootstrappedSettings). | ||
settings( | ||
triggeredMessage in ThisBuild := Watched.clearWhenTriggered, | ||
submoduleChecks, | ||
dottyProjectFolderChecks, | ||
|
||
addCommandAlias("run", "dotty-compiler/run") ++ | ||
addCommandAlias("legacyTests", "dotty-compiler/testOnly dotc.tests") | ||
|
@@ -1138,7 +1138,7 @@ object Build { | |
)) | ||
} | ||
|
||
lazy val submoduleChecks = onLoad in Global := (onLoad in Global).value andThen { state => | ||
lazy val dottyProjectFolderChecks = onLoad in Global := (onLoad in Global).value andThen { state => | ||
val submodules = List(new File("scala-backend"), new File("scala2-library"), new File("collection-strawman")) | ||
if (!submodules.forall(f => f.exists && f.listFiles().nonEmpty)) { | ||
sLog.value.log(Level.Error, | ||
|
@@ -1147,6 +1147,13 @@ object Build { | |
| > git submodule update --init | ||
""".stripMargin) | ||
} | ||
|
||
val vscodeSetting = new File(".vscode/settings.json") | ||
if(!vscodeSetting.exists()) { | ||
val vscodeSettingTemplate = new File(".vscode/settings-template.json") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would use a .vscode-template directory instead:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would also add a comment explaining what this does. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good idea |
||
java.nio.file.Files.copy(vscodeSettingTemplate.toPath, vscodeSetting.toPath) | ||
} | ||
|
||
state | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space after if