General

Evaluate a piece of elisp code

enable / disable tabs instead of spaces on a buffer

set indent-tab-mode to t to enable tabs.

Major modes

Markdown mode

Table editing

Spacemacs

Reinstall packages

remove packages under elpa/ directory and restart emacs.

Key binds

LSP

Metals

Bloop with gradle

buildscript {
    repositories {
        mavenCentral()
    }

    dependencies { classpath("ch.epfl.scala:gradle-bloop_2.12:1.6.0") }
}

apply(plugin = "bloop")

Log location

Reinstall metals

Delete .cache/lsp/metals/ and install server again.

Clangd

Project setup

cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1

Emacs for Mac

Trouble shooting

Too many open files

This problem cannot be simply solved by increasing ulimit because

Emacs uses pselect, which is limited to FD_SETSIZE file descriptors, usually 1024.

It requires to build Emacs to change FD_SETSIZE.

lsp-mode tends to consume many file descriptors for file watching. file-notify-rm-all-watches can be used to free up descriptors as a workaound.

reference: Fix annoying max open files for Emacs

Links