yaodong / doom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Emacs Configuration

This GitHub repository houses my personal Emacs configuration. It serves as a centralized location for me to manage and customize my Emacs setup according to my individual needs and preferences.

Please bear in mind that this configuration is tailored specifically to my own workflow and might not be suitable for everyone. While others are welcome to explore and utilize it as a reference, it is advised to review and modify the configuration to better align with your own requirements and preferences.

Feel free to browse the files and settings within this repository. If you find any areas of interest or have suggestions for improvements, I welcome your feedback. Happy Emacs customization!

Installation

I use Doom Emacs. If you’re not familiar with it, here are some useful resources:

Other awesome starter kits:

Install Dependencies

brew install git ripgrep coreutils fd
xcode-select --install

Install Fonts

I use JetBrains Mono as my default font to ensure consistency across all my editors.

Install Emacs

I recommened using emacs-plus, as it is well-maintained, up-to-date, and stable.

brew tap d12frosted/emacs-plus
brew install emacs-plus --with-native-comp

Install Doom Emacs

The following commands are soruced from the Doom Emacs README document. However, it is highly recommened to refer to the original documentation for the most up-to-date information.

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

Install This Configuration

Finally, clone this repo before starting Emacs.

git clone git@github.com:yaodong/doom.git ~/.config/doom
~/.config/emacs/bin/doom sync

Install Nerd Icons Fonts

If the dashboard icons are broken, install the missing fonts using M-x and nerd-icons-install-fonts.

Customizations

Following are detailed explanations about the customizations.

Restrict Commit Message

To restrict commit messages to my personal contact information, I use Overcommit (Ruby) for checking the committer’s email. There are alternatives, such as pre-commit (Python) and Husky (JavaScript).

Keybinding

According to the Emacs manual, sequences consisting of C-c and a letter are reserved for users; they are only sequences reserved for users. So I bind frequently used functions with prefix key C-c.

Switching Themes

I constantly switch between light and dark themes, so I use heaven-and-hell along with the keybinding SPC h h to toggle between the doom-one-light and doom-nord themes.

Handy Buffers

TBD

Appearance

TBD

Programming

Python

I enabled the following layers:

(python +pyenv +lsp +pyright)

The +lsp module will automatically configure flycheck to use lsp as default checker.

To enable debugger, install

pip install debugpy

Rust

Install cargo using rustup:

curl https://sh.rustup.rs -sSf | sh

Add cargo bin folder to $PATH:

export PATH="$PATH:$HOME/.cargo/bin"

Tailwindcss

Install rustywind:

cargo install rustywind

Org-mode

TBD

Org-roam for Managing Notes

Topic-specific Captures

TBD

Installation

Install graphviz if org-roam-graph raises the following error:

if: Cannot find executable "dot" to generate the graph.  Please adjust ‘org-roam-graph-executable’

References

About


Languages

Language:Emacs Lisp 100.0%