-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2523 from VirtusLab/stable
Back port of documentation changes to main
- Loading branch information
Showing
3 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: Scala CLI within Emacs | ||
sidebar_position: 14 | ||
--- | ||
|
||
Emacs users can make it easier to use Scala CLI from within their editor by | ||
loading an extension: <https://github.com/ag91/scala-cli-repl>. | ||
|
||
That lets you send Scala code directly from your buffer to the Scala REPL. | ||
|
||
![scala-cli-repl-demo](/img/scala-cli-repl.jpg) | ||
|
||
The extension also facilitates [literate | ||
programming](https://en.wikipedia.org/wiki/Literate_programming) using | ||
[Org Mode](https://orgmode.org/), by letting the user experiment with | ||
source blocks looking like the following. | ||
|
||
``` org | ||
#+begin_src scala :scala-version 3.0.0 :dep '("com.lihaoyi::os-lib:0.9.0") | ||
println("This is:" + os.pwd) | ||
#+end_src | ||
#+end_src | ||
``` | ||
|
||
In the above you can see that you can select the Scala version and | ||
dependencies you need for your code. | ||
|
||
The users who use [lsp-metals](https://github.com/emacs-lsp/lsp-metals) | ||
can also enable lsp support within a source block to access utilities as | ||
completion and navigation from within the Org Mode file. |
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.