emacs 27 rocks

2020-03-17

Resuming work on Github projects recently, meant that I got to check the changes to Emacs and other tools that accumulated over the past 2.5 years. It all went very smoothly and was a great upgrade in my eyes. You'll find more detailed information about the update (or later here), but I want to point out some things that stand out to me. As the post is bound to be outdated, check here for my current setup.

lsp - language server protocol

This was one of the biggest improvements that happened over the past 2.5 years, as the use of Go modules had slowed down some of the tools that I used extensively. lsp, or more specifically gopls and lsp-mode solve these issues beautifully. The important part was following the performance recommendations. Most are straight-forward, just to make sure my Emacs had native JSON support I had to fiddle with the homebrew formula a bit.

brew edit emacs

To link jansson I added the following to the head do block:

depends_on "jansson" => :build

Installed it via:

brew install --HEAD emacs

Summary of the other changes:

(setq
  gc-cons-threshold 100000000
  read-process-output-max (* 10 1024 1024)
  lsp-prefer-capf t)

I'm a terminal-only user of Emacs, so I prefer to show extra information in the minibuffer:

(setq
  lsp-eldoc-render-all t
  lsp-ui-doc-enable nil
  lsp-ui-sideline-enable nil)

package-quickstart

These improvements cut down startup time to 300-400ms on my 2015 MBP. It comes down to enabling it:

(setq package-quickstart t)

I also dropped my customization of package-user-dir and call to package-initialize and only add MELPA for additional packages:

(setq package-archives '(("melpa" . "http://melpa.org/packages/")
                         ("gnu" . "http://elpa.gnu.org/packages/")))

isearch-lazy-count

isearch can now display the current and total number of matches in the search prompt. Previously I used anzu for this, but glad to drop an orphaned dependency.

(setq isearch-lazy-count t)