https://github.com/sciss/dotterweide-exp-metals
Dotterweide experiments in using the Metals language server. Mirror of https://codeberg.org/sciss/dotterweide-exp-metals
https://github.com/sciss/dotterweide-exp-metals
Last synced: 12 months ago
JSON representation
Dotterweide experiments in using the Metals language server. Mirror of https://codeberg.org/sciss/dotterweide-exp-metals
- Host: GitHub
- URL: https://github.com/sciss/dotterweide-exp-metals
- Owner: Sciss
- License: lgpl-2.1
- Created: 2023-08-04T17:01:35.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-03T11:38:18.000Z (almost 3 years ago)
- Last Synced: 2025-02-23T17:22:47.139Z (over 1 year ago)
- Language: Scala
- Homepage:
- Size: 94.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# dotterweide-exp-metals
[](https://gitter.im/dotterweide/dotterweide-org?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[](https://github.com/dotterweide/dotterweide-exp-metals/actions?query=workflow%3A%22Scala+CI%22)
The Dotterweide projects aims to develop an embeddable mini-IDE with support for the Scala programming language.
Please refer to the [organisational project](https://github.com/dotterweide/dotterweide-org) for further information.
This `-exp-metals` repository contains experimental code to understand potential interaction with
the [Metals](https://scalameta.org/metals/) language server.
This repository is covered by the
[GNU Lesser General Public License v2.1](https://www.gnu.org/licenses/lgpl-2.1.txt) or higher.
The project build with [sbt](http://www.scala-sbt.org/) with the main Scala version being 2.13.x.
There was a first [demo video](https://peertube.social/videos/watch/3b142190-26b1-47f6-8950-0e0700e19883) showing that
it works in principle (compiler error highlighting).
## credits
We use knowledge from [intelli-lsp](https://github.com/gtache/intellij-lsp) by Guillaume Tâche,
released under Apache 2.0 License.
File `Scala.tmLanguage.json`, while evaluating tm4s, is taken from https://github.com/scala/vscode-scala-syntax ,
released under MIT License.
## installation
You currently have to install Metals in the project's root directory:
coursier bootstrap org.scalameta:metals_2.13:1.0.1 -o metals -f
(If using a snapshot version of metals, add `-r sonatype:snapshots`).
## notes
For bundling Coursier to install Metals, see [Mellite-launcher project](https://github.com/Sciss/Mellite-launcher).
Possible syntax parsers to replace scalariform. First, based on TextMate and VS Code:
- https://github.com/scala/vscode-scala-syntax - reg-ex based type script file
- https://github.com/Microsoft/vscode-textmate - the regex parser for textmate bundles used by vs code
(wraps Oniguruma C regex library via wasm)
- https://github.com/jruby/joni - Java port of Oniguruma
- https://github.com/eclipse/tm4e - Java port of vscode-textmate for use within eclipse, but core package seems
usable outside of eclipse
Ólafur says "you can populate the download cache by calling this dedicated main method
https://github.com/scalameta/metals/blob/main/metals/src/main/scala/scala/meta/metals/DownloadDependencies.scala "
Then Ammonite:
- https://github.com/com-lihaoyi/fastparse - Scala library that includes a parser example for Scala 2
LH says "Ammonite uses scalaparse for syntax highlighting without generating a token stream; you can look at the code
and see how it's done with intercept and tracking character ranges".
## Current issues
Some compiler errors are caught by bloop (`stale bloop error: ...`) instead of being communicated via LSP, see
https://github.com/scalameta/metals/discussions/5527