Skip to content

Instantly share code, notes, and snippets.

View nimeshneema's full-sized avatar

Nimesh Neema nimeshneema

View GitHub Profile
# 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)
# 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
object Main:
def greet(name: String): String =
s"Hello, $name!"
def main(args: Array[String]): Unit =
val message = greet("World")
println(message)
scalaVersion := "3.3.1"
name := "hello-world"
version := "1.0"
;;; 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