Skip to main content

Overview

This Doom Emacs configuration provides a comprehensive development environment with vim keybindings, enhanced UI features, and support for multiple programming languages including Haskell, Elixir, JavaScript, and more.

Key Features

Evil Mode

Vim keybindings everywhere for efficient editing

Project Management

Neotree integration for file navigation

Multi-Language Support

Configured for 15+ programming languages

Git Integration

Magit for powerful version control

Installation

1

Install Doom Emacs

git clone --depth 1 https://github.com/doomemacs/doomemacs ~/.emacs.d
~/.emacs.d/bin/doom install
2

Copy Configuration Files

Place the configuration files in ~/.doom.d/:
  • config.el - Main configuration
  • init.el - Module selection
  • packages.el - Package declarations
3

Sync Configuration

~/.emacs.d/bin/doom sync
4

Restart Emacs

Launch Emacs to apply the new configuration

Configuration Files

config.el

Main configuration file with custom keybindings, theme settings, and user preferences.

Custom Keybindings

config.el
;; Global keys
(global-set-key [f8] 'neotree-toggle)
(global-set-key (kbd "C-<tab>") 'other-window)
(global-set-key (kbd "M-<down>") 'enlarge-window)
(global-set-key (kbd "M-<up>") 'shrink-window)
(global-set-key (kbd "M-<right>") 'enlarge-window-horizontally)
(global-set-key (kbd "M-<left>") 'shrink-window-horizontally)
KeyAction
F8Toggle Neotree file browser
Ctrl+TabSwitch between windows
Meta+DownEnlarge window vertically
Meta+UpShrink window vertically
Meta+RightEnlarge window horizontally
Meta+LeftShrink window horizontally

User Settings

config.el
(setq user-full-name "João Pedro"
      user-mail-address "[email protected]"
      doom-theme 'doom-palenight
      org-directory "~/org/"
      display-line-numbers-type `relative)

Font Configuration

config.el
(setq doom-font (font-spec :family "monospace" :size 16)
     doom-variable-pitch-font (font-spec :family "monospace" :size 16)
     doom-big-font (font-spec :family "monospace" :size 24))

Plugins

config.el
;; Neo theme icons
(setq neo-theme (if (display-graphic-p) 'icons 'arrow))

;; Waka time tracking
(global-wakatime-mode)

init.el

Module configuration that defines which Doom modules are enabled.

Enabled Modules

  • company: Code completion backend
  • ivy: Search engine for files and commands

Language Support

init.el:111
:lang
cc                ; C/C++/Obj-C
elixir            ; Erlang done right
emacs-lisp        ; Lisp for Emacs
erlang            ; Erlang
fsharp            ; F# support
(haskell +dante)  ; Haskell with Dante
json              ; JSON files
javascript        ; JavaScript
latex             ; LaTeX documents
markdown          ; Markdown files
org               ; Org mode
racket            ; Racket language
sh                ; Shell scripts
yaml              ; YAML files

packages.el

Additional packages beyond the default Doom modules.
packages.el
(package! auto-complete)
(package! which-key)
(package! magit)
(package! wakatime-mode)
(package! nyan-mode)
(package! emojify)

;; Neotree
(package! neotree)
(package! all-the-icons)

;; Theme
(package! rebecca-theme)

;; Haskell
(package! haskell-mode)

;; Elixir
(package! elixir-mode)
(package! exunit)
(package! flycheck-credo)
(package! alchemist)
(package! mix)
After modifying packages.el, run doom sync to install the new packages.

Usage

Basic Commands

Help System

  • SPC h d h - Access Doom documentation
  • K - View documentation for symbol
  • gd - Jump to definition

File Navigation

  • SPC . - Find file
  • SPC / - Search project
  • F8 - Toggle Neotree

Window Management

  • Ctrl+Tab - Switch windows
  • Meta+Arrows - Resize windows
  • SPC w - Window commands

Git Operations

  • SPC g g - Magit status
  • SPC g b - Git blame
  • SPC g l - Git log

Terminal Integration

vterm             ; Terminal emulator within Emacs
Access terminal with SPC o t for a full-featured terminal inside Emacs.

Code Editing Features

1

Format on Save

Code is automatically formatted when you save files:
(format +onsave)  ; automated prettiness
2

Multiple Cursors

Edit multiple locations simultaneously with multiple-cursors mode
3

Syntax Checking

Real-time syntax checking and spell checking enabled:
syntax            ; syntax checking
spell             ; spell checking
grammar           ; grammar checking

Customization

Changing the Theme

Edit config.el and modify the doom-theme variable:
(setq doom-theme 'doom-palenight)  ; Current theme
;; Other options:
;; 'doom-one, 'doom-vibrant, 'doom-molokai, 'rebecca

Adding More Languages

Edit init.el in the :lang section and add desired language modules:
:lang
python            ; Enable Python support
rust              ; Enable Rust support
go                ; Enable Go support
Then run doom sync to apply changes.

Installing Additional Packages

Add to packages.el:
(package! your-package-name)
Run doom sync and restart Emacs.

Troubleshooting

If icons don’t display correctly in Neotree, install the required fonts:
M-x all-the-icons-install-fonts
  • SPC h r r - Reload Doom
  • Or run doom sync from terminal
doom doctor
This command checks for common configuration issues.
doom upgrade
doom sync

Resources

Build docs developers (and LLMs) love