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
| # Backup first (just in case) | |
| cp -r ~/.emacs.d ~/.emacs.d.backup.$(date +%Y%m%d) | |
| # Remove all installed packages and elpa directory | |
| rm -rf ~/.emacs.d/elpa | |
| rm -rf ~/.emacs.d/lsp-session* | |
| rm -rf ~/.emacs.d/.lsp-session* | |
| # Remove any Metals server installations managed by lsp-metals | |
| # (lsp-metals installs metals under this path by default) |
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
| # Java (Metals requires JDK 11 or 17, prefer 17) | |
| sudo apt update | |
| sudo apt install -y openjdk-17-jdk curl wget git | |
| # Verify | |
| java -version # should show 17.x | |
| # coursier (the Scala installer/launcher - used to install Metals) | |
| curl -fL "https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-linux.gz" | gzip -d > ~/.local/bin/cs | |
| chmod +x ~/.local/bin/cs |
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
| object Main: | |
| def greet(name: String): String = | |
| s"Hello, $name!" | |
| def main(args: Array[String]): Unit = | |
| val message = greet("World") | |
| println(message) |
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
| scalaVersion := "3.3.1" | |
| name := "hello-world" | |
| version := "1.0" |
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
| ;;; init.el --- Scala IDE configuration for Emacs 30.2 | |
| ;;; -*- lexical-binding: t -*- | |
| ;; ============================================================ | |
| ;; SECTION 1: Package Manager Bootstrap | |
| ;; ============================================================ | |
| (require 'package) | |
| ;; Package archives: MELPA (latest) + GNU + NonGNU |