No description
Find a file
2025-12-09 11:42:42 +03:00
config.el Initial doom config for Erlang/LFE development 2025-12-09 11:23:13 +03:00
custom.el Initial doom config for Erlang/LFE development 2025-12-09 11:23:13 +03:00
init.el Initial doom config for Erlang/LFE development 2025-12-09 11:23:13 +03:00
packages.el Initial doom config for Erlang/LFE development 2025-12-09 11:23:13 +03:00
README.md docs: add lfe-ls link and brew dependencies 2025-12-09 11:42:42 +03:00

Doom Emacs Configuration

Personal Doom Emacs configuration for Erlang/OTP and LFE development.

Quick Start (Using This Repo)

# 1. Install Emacs first (see macOS Installation below)

# 2. Install Doom Emacs
git clone https://github.com/doomemacs/doomemacs ~/.config/emacs

# 3. Clone this config
git clone git@git.hitech.fast:hitech/doom-emacs.git ~/.config/doom

# 4. Run doom install/sync
~/.config/emacs/bin/doom install
doom sync

# 5. Add shell setup to ~/.zshrc (see Shell Setup section)

macOS Installation

Emacs Mac Port

brew tap railwaycat/emacsmacport
brew install emacs-mac --with-imagemagick --with-modern-icon --with-modules

Doom Emacs

git clone https://github.com/doomemacs/doomemacs ~/.config/emacs
~/.config/emacs/bin/doom install

Shell Setup (.zshrc)

# Emacs
export EMACSPATH=$HOME/.config/emacs
export PATH="$EMACSPATH/bin:$PATH"

# Daemon auto-start
if ! pgrep -U "$USER" -x "emacs" > /dev/null; then
    emacs --daemon &> /dev/null &
fi

alias e='emacsclient -t -a ""'   # terminal
alias ec='emacsclient -c -a ""'  # GUI

Other Tools

brew install ag         # silver searcher (for doom)
brew install just       # command runner
brew install direnv     # directory-based env vars
brew install libvterm   # for vterm terminal
brew install cmake      # for vterm compilation

Prerequisites

Language Servers

erlang_ls

Erlang Language Server - starts automatically via eglot.

# Install via releases or build from source
# https://github.com/erlang-ls/erlang_ls

Current location: ~/.local/bin/erlang_ls

lfe-ls

LFE Language Server - must be started manually before opening LFE files.

# Install from source
# https://github.com/mdbergmann/lfe-ls

# Start the server (listens on localhost:10567)
lfe-ls

Current location: ~/.local/bin/lfe-ls

Other Tools

  • just - Command runner (brew install just)

Files

File Purpose
init.el Doom modules (erlang, elixir, etc.)
config.el Personal configuration
packages.el Additional packages
custom.el Emacs customize settings

Key Configurations

Erlang

  • Auto-starts erlang_ls via eglot when opening .erl files
  • Enabled in init.el: erlang

LFE (Lisp Flavoured Erlang)

  • Connects to lfe-ls on localhost:10567
  • Requires manual start: run lfe-ls in a terminal first
  • Syntax highlighting via lfe-mode

Justfile

  • just-mode for syntax highlighting
  • SPC j to run recipes via justl

UI

  • Theme: doom-one
  • Transparency: 85% (requires Emacs 29+)
  • Line numbers enabled

Usage

# Sync doom after changes
doom sync

# For LFE development, start lfe-ls first
lfe-ls &

# Then open Emacs
emacs

Troubleshooting

eglot can't connect to lfe-ls

Make sure lfe-ls is running:

lfe-ls
# Should show: port: {ok,10567}

erlang_ls not found

Ensure it's in PATH:

which erlang_ls
# Should return ~/.local/bin/erlang_ls or similar