Buffer Yard

Emacs Configuration for Beginners: A Starter Guide to Your First init.el

You opened Emacs, saw a grey splash screen and a manual about a tutorial, and closed it again. This guide is for the second attempt: how to configure Emacs from an empty init.el into an Emacs starter config you understand line by line, with a theme, fast completion and a language server for the code you actually write.

Updated

Illustration of a dark keyboard panel with a single highlighted key and a small crane hook lifting a code file
01The parts

What a starter Emacs configuration needs

Most beginners overestimate how much code this takes. A useful Emacs configuration is smaller than most people expect. Strip away the screenshots of elaborate dashboards and almost every working setup rests on the same five parts. Get these right and the rest of your Emacs configuration is a matter of taste.

1. Package archives

Emacs installs extensions from archives. GNU ELPA and NonGNU ELPA are enabled out of the box; MELPA is the large community archive and needs one line to switch on. Add it once, at the top of the file, and forget about it.

2. use-package

Since Emacs 29.1, use-package ships with the editor. It gives every package one tidy block: install it, set its options, bind its keys, load it only when needed. A starter config written with it stays readable even when it grows to a few hundred lines.

3. A completion framework

The default minibuffer completion works, but it hides your options until you press TAB. A vertical completion UI such as Vertico shows candidates as you type, which changes how quickly you find files, buffers and commands. The completion comparison covers Vertico, Ivy and Helm in detail.

4. A theme

Emacs 28 and later ship the Modus themes, which are accessible and well documented. Solarized, Zenburn and Doom One are one install away. More on that in the themes guide.

5. Language support

The built-in eglot client talks to language servers (pyright, gopls, rust-analyzer, clangd and many more), so one hook gives you completion, go-to-definition and diagnostics for most languages. Pick your language below for the details.

Everything else, from Git integration with Magit to note-taking with Org, can wait until this core works.

02One file

A minimal Emacs init.el for beginners

Here is a complete Emacs starter config. Save it as ~/.emacs.d/init.el (or ~/.config/emacs/init.el), start Emacs, and give it a minute on the first run while it downloads packages.

;;; init.el --- a small starter configuration  -*- lexical-binding: t -*-

;; Package archives: GNU ELPA and NonGNU ELPA are on by default.
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(setq use-package-always-ensure t)

;; Quieter defaults
(setq inhibit-startup-screen t
      make-backup-files nil
      custom-file (locate-user-emacs-file "custom.el"))
(load custom-file 'noerror)
(recentf-mode 1)
(savehist-mode 1)

;; Completion in the minibuffer
(use-package vertico :init (vertico-mode 1))
(use-package orderless
  :custom (completion-styles '(orderless basic)))
(use-package marginalia :init (marginalia-mode 1))

;; A theme that ships with Emacs 28 and later
(load-theme 'modus-vivendi t)

;; Language servers through the built-in client
(use-package eglot
  :ensure nil
  :hook ((python-mode python-ts-mode go-mode rust-mode) . eglot-ensure))

Read it top to bottom once, because knowing what each line in your Emacs init.el does is the point of the exercise. The first block tells Emacs where packages come from and makes use-package install anything missing. The second block turns off the startup screen and backup files, and moves the settings that the Customize interface writes into a separate custom.el, so your Emacs init.el stays yours. recentf-mode and savehist-mode remember recent files and minibuffer history between sessions: two lines, and the editor feels less forgetful immediately.

The completion block installs three small packages that work together. Vertico draws the vertical list, Orderless lets you type words in any order (init el finds init.el, so does el ini), and Marginalia adds a short description next to each candidate.

The last form is where beginners usually get stuck, so it is worth a sentence. eglot is built in, which is why it carries :ensure nil; the hook starts it whenever a Python, Go or Rust file opens. It still needs the language server itself on your machine, which is a job for your package manager or the language's own tooling, not for Emacs.

If something fails on startup, run emacs --debug-init from a terminal. The backtrace names the line.

03Eleven languages

Pick your languages

Each setup page starts from the starter config above and adds only what that language needs: the major mode, the language server, formatting and a way to run code or tests from inside Emacs.

04Look

Four dark themes worth trying first

A theme is the cheapest change with the largest effect on how Emacs feels. These four are mature, cover most major modes and look the way their names suggest. All of them load with a single load-theme call.

(defun greet (name)
  (message "Hello, %s" name))
Solarized Dark

Low-contrast blue-green, easy on long sessions.

(defun greet (name)
  (message "Hello, %s" name))
Zenburn

Warm grey with muted pastels, an old favourite.

(defun greet (name)
  (message "Hello, %s" name))
Spacemacs Dark

Purple and blue accents, works well beyond Spacemacs.

(defun greet (name)
  (message "Hello, %s" name))
Doom One

Atom-style palette from the doom-themes pack.

Light themes are covered too: Modus Operandi is one of the most legible themes in any editor. The full themes guide explains how to switch cleanly between two themes without leftover colours.

05Finding things

Completion: Vertico, Ivy or Helm

Older guides recommend Helm or Ivy. Both still work. For a starter config in 2026 the short answer is Vertico, because it builds on Emacs's own completion functions instead of replacing them, so every command that asks you for input benefits without extra glue.

QuestionVerticoIvyHelm
Uses built-in completing-readYesThrough its own APIThrough its own API
Packages you usually addOrderless, Marginalia, ConsultCounsel, SwiperNone, it is one large package
Configuration effortLowLowMedium
Search inside the bufferconsult-lineswiperhelm-occur

Switching later is not a big deal either: with Vertico the commands you call are still the standard ones, so removing it leaves a working editor behind. The completion framework comparison goes through each option with a working snippet.

06Hands

The twelve keys a beginner uses every day

Emacs writes C- for Control and M- for Meta, which is Alt on most keyboards. A sequence like C-x C-f means: hold Control, press x, then (still holding Control, or not) press f.

KeysDoesKeysDoes
C-x C-fOpen a fileC-gCancel whatever is happening
C-x C-sSave the bufferM-xRun a command by name
C-x bSwitch bufferC-x kKill (close) a buffer
C-x 2Split the window belowC-x oJump to the other window
C-sSearch forwardC-/Undo
C-h kDescribe what a key doesC-x C-cQuit Emacs

C-g deserves its own line. Whenever Emacs seems stuck waiting for input you did not mean to give, press it, twice if needed. The essential keybindings cheat sheet lists the next forty.

07The plan

How to configure Emacs: a five-evening guide

Trying to build the perfect setup in one sitting is the usual way people give up. If you are wondering how to configure Emacs without burning out on it, spread the work over a week. The plan below is written for beginners and assumes nothing beyond a working installation.

  1. Evening one: install Emacs from your platform's usual source, run the built-in tutorial with C-h t, and stop when you can open, edit and save a file without the mouse.
  2. Evening two: paste the starter config above, restart, and use it for real work for a day.
  3. Evening three: set up your main language from the list. Install its language server first, then open a project and check that diagnostics appear.
  4. Evening four: pick a theme and a font, then read the packages guide on how use-package loads things lazily.
  5. Evening five: open your init.el and delete every line you cannot explain. Keep notes as comments.

That last step matters more than it sounds. A configuration you understand is one you can fix at 11 p.m. before a deadline, and that is the whole argument for writing your own Emacs configuration instead of borrowing somebody else's 3,000 lines.

One side note that does not fit anywhere else: put the file under version control from the first evening. git init inside ~/.emacs.d, a .gitignore for elpa/ and custom.el, and you can try any experiment knowing the way back is one git checkout away.

08Questions

Questions readers ask

Where does Emacs look for my init.el?

Emacs reads ~/.emacs, then ~/.emacs.d/init.el, then ~/.config/emacs/init.el (the XDG location, used when the other two do not exist). Run C-h v user-init-file inside Emacs to see which file it actually loaded.

Should a beginner start with Doom Emacs or Spacemacs instead?

Both are good if you want a finished editor today and accept their conventions. If you want to understand every line that runs at startup, a starter config of 40 to 80 lines teaches you more and is easier to debug when an update breaks something.

Do I need MELPA at all?

For a very small setup, GNU ELPA and NonGNU ELPA already cover Vertico, Orderless, Marginalia and many themes. MELPA adds the long tail: most language modes outside the core and a large share of the community packages you will meet in other configs.

How long should Emacs take to start with a starter configuration?

A config of this size usually starts in well under a second on a current machine. Run M-x emacs-init-time after startup; if it climbs past two seconds, look for packages loaded eagerly that could wait with :defer or a hook.

Is Emacs Lisp hard to learn for configuration work?

For configuration you need very little of it: setq, a few function calls and the shape of a use-package form. The built-in manual "An Introduction to Programming in Emacs Lisp" (C-h i, then pick it from the list) covers the rest at your own pace.