A personal Emacs configuration.
git clone https://github.com/yilin-zhang/.emacs.d.git ~/.emacs.d
cd ~/.emacs.d
git submodule update --init
brew tap homebrew/cask-fonts
brew install coreutils font-sarasa-gothic font-noto-serif-cjk-sc
brew install ripgrep
- Install
enchant
andpkgconf
brew install enchant pkgconf
- Override the configuration to use
AppleSpell
by default. Create or modify~/.config/enchant/enchant.ordering
:*:AppleSpell en_US:AppleSpell
Install nerd fonts in Emacs: M-x nerd-icons-install-fonts
Language | Server |
---|---|
Python | pyright |
JS/TS | typescript-langauge-server |
JSON | vscode-json-languageserver |
Vue | vue-language-server |
Lua | lua-language-server |
Put the OpenAI API key in a text file at ~/.emacs.d/custom/gptel-api-key
.
Create file ~/.emacs.d/custom/custom-post.el
. The configuration in the file will
be loaded last.
The most important configuration is to set org-agenda-files
, so that Emacs knows
where you agenda files are.
(use-package org
:ensure nil
:config
(add-to-list 'org-agenda-files "~/info.org")
(add-to-list 'org-agenda-files "~/inbox.org")
;; org-ref
(setq reftex-default-bibliography '("~/references.bib"))
;; see org-ref for use of these variables
(setq org-ref-bibliography-notes "~/bib-notes.org"
org-ref-default-bibliography '("~/references.bib")
org-ref-pdf-directory "~/bibtex-pdfs/")
)
Set the RSS feeds by setting elfeed-feeds
. Example:
(setq elfeed-feeds '("https://protesilaos.com/books.xml"))
Set the denote bucket by setting denote-directory
. Example:
(setq denote-directory "~/Documents/notebooks/denote")
Define some leader keys. Example:
(meow-leader-define-key
'("t" . yilin/open-in-terminal)
'("e" . yilin/open-in-finder))
Add system prompts. Example:
(dolist (directive '((custom-role-a . "You are a large language model and ...")
(custom-role-b . "You are a large language model and ...")))
(add-to-list 'gptel-directives directive))