-
Notifications
You must be signed in to change notification settings - Fork 1.1k
change doc to recommend metals worksheet #12874
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
--- | ||
layout: doc-page | ||
title: "Worksheet mode with Dotty IDE" | ||
title: "Worksheet mode with Metals" | ||
--- | ||
|
||
A worksheet is a Scala file that is evaluated on save, and the result of each | ||
expression is shown in a column to the right of your program. Worksheets are | ||
A worksheet is a Scala file that is evaluated on save, powered | ||
by [Scala Metals](https://scalameta.org/metals/), and the result of each | ||
expression is shown at the end of the line it is defined on. Worksheets are | ||
like a REPL session on steroids, and enjoy 1st class editor support: completion, | ||
hyperlinking, interactive errors-as-you-type, etc. Worksheet use the extension | ||
`.sc`. | ||
`.worksheet.sc`. | ||
|
||
How to use the worksheets | ||
========================= | ||
The only supported client for the Worksheet mode is [Visual Studio | ||
Code](https://code.visualstudio.com/). | ||
|
||
To use the worksheets, start Dotty IDE by [following the | ||
instruction](ide-support.md) and create a new file `MyWorksheet.sc` and | ||
To use the worksheets, start Metals by [following the | ||
instruction](ide-support.md) and create a new file `MyWorksheet.worksheet.sc` and | ||
write some code: | ||
|
||
```scala | ||
|
@@ -24,27 +25,20 @@ println("Hello, worksheets!") | |
456 + xyz | ||
``` | ||
|
||
On top of the buffer, the message `Run this worksheet` appears. Click it to | ||
evaluate the code of the worksheet. Each line of output is printed on the right | ||
On top of the buffer, the message `Copy Worksheet Output` appears. Save the file to evaluate the code of the worksheet. Each line of output is printed on the right | ||
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 wouldn't mention |
||
of the expression that produced it. The worksheets run with the classes of your | ||
project and its dependencies on their classpath. | ||
|
||
 | ||
|
||
By default, the worksheets are also run when the file is saved. This can be | ||
configured in VSCode preferences: | ||
|
||
 | ||
|
||
Note that the worksheet are fully integrated with the rest of Dotty IDE: While | ||
typing, errors are shown, completions are suggested, and you can use all the | ||
other features of Dotty IDE such as go to definition, find all references, etc. | ||
Note that the worksheet are fully integrated with the rest of Metals: | ||
When you type, completions are suggested, and when you save errors are shown. | ||
You can use all the other features of Metals such as go to definition, | ||
find all references, etc. | ||
|
||
 | ||
|
||
Implementation details | ||
More Information | ||
====================== | ||
|
||
The implementation details of the worksheet mode and the information necessary to add support for | ||
other clients are available in [Worksheet mode - Implementation | ||
details](worksheet-mode-implementation-details.md). | ||
find out more in the [Metals Documentation](https://scalameta.org/metals/docs/editors/vscode.html#worksheets). |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.