emacs配置

1 安装

1
brew install --cask emacs

2 Doom Emacs

2.1安装依赖

1
brew install git ripgrep fd

2.2 Doom Emacs克隆

1
git clone https://github.com/doomemacs/doomemacs ~/.emacs.d

2.3 初始化

1
~/.emacs.d/bin/doom install

3 启用模块

修改配置文件 放开注释或者添加对应的模块

1
vim ~/.doom.d/init.el
  • :tools下面添加lsp
  • :lang放开注释支持cpp (cc +lsp)

在环境变量中添加export PATH="$HOME/.emacs.d/bin:$PATH"然后执行doom sync

4 安装clangd

1
2
3
brew install llvm

clangd --version

5 使用

1
emacs . -nw

emacs配置
https://bannirui.github.io/2026/04/03/Note/emacs配置/
作者
dingrui
发布于
2026年4月3日
许可协议