参考自 emacs.d/init.el at master · bbatsov/emacs.d
- BurntSushi/ripgrep (consult-ripgrep)
- laishulu/macism (sis/mac)
- ryanoasis/nerd-fonts (nerd-icons)
- locate - ArchWiki (consult-locate)
不同主机通过配置环境变量自定义,目前所用环境变量:
- WRITING_HOME
- GTD_HOME
使用 purcell/exec-path-from-shell 共享用户 shell 环境变量。或者修改 LaunchAgents.
新建 ~/Library/LaunchAgents/environment.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>my.startup</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-c</string>
<string>
launchctl setenv PRODUCTS_PATH /Users/mortimer/Projects/my_products
launchctl setenv ANDROID_NDK_HOME /Applications/android-ndk
launchctl setenv PATH $PATH:/Applications/gradle/bin
</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
launchctl load ~/Library/LaunchAgents/environment.plist
launchctl start ~/Library/LaunchAgents/environment.plist
手动执行一次:
(treesit-auto-install-all)
需要安装 pyright
启用 conda.el 需要 emacs 运行环境中找到环境变量:
- CONDA_EXE
- 满足
CONDA_EXE=$CONDA_HOME/bin/conda
存放 org-roam-procotol
在对应操作系统上的 scheme-handler,其他细节见,Org-roam User Manual#MacOS
确保 emacs 有作为 server 启动,通过判断变量 server-process
是否存在可以确定。
server-start
启动服务。
复制 assets/macOS/OrgProtocolClient.app
到目录 /Applications
。需要手动运行一遍,让 scheme-handler 注册生效。
复制 assets/linux/org-protocol.desktop
到目录 $HOME/.local/share/applications/
执行一下代码设置 scheme-handler
xdg-mime default org-protocol.desktop x-scheme-handler/org-protocol