Skip to content

rennsax/.emacs.d

Repository files navigation

Celeste Emacs

celeste strawberry

Simple, lightweight and bespoked Emacs configurations.

GNU Emacs 30.1 GitHub License macOS GNU/Linux


Installation

Emacs

You can get the source code for Emacs here. Either use curl -sSLO or wget.

macOS

Directly installed from Homebrew’s default formulae is OK, but you may get an Emacs without some essential new features, such as native compilation. I recommend installing a third-party distributed Emacs bundles such as d12frosted/homebrew-emacs-plus.

brew install emacs-plus@30 --with-imagemagick

You can also pick your favorite icon here.

NixOS

Emacs is available on Nixpkgs.

Hard Dependencies

Hard dependencies are external tools that are required by some Emacs packages. To use these packages, you need first install the corresponding tools with your favorite package manager on your platform (such as homebrew on macOS, apt on Ubuntu).

Hard dependencies are listed here. An asterisk symbol indicates that the tool is optional for the package(s).

ToolUsed byDescription
trash-clitrashLinux. Buggy on macOS.
macos-trashtrashmacOS.
man-dbmanmacOS. Most GNU/Linux distros have builtin.
ripgrepconsult, deadgrepAnother Rust winner!
fdconsultfind(1)’s alternative.
pandocorg-pandoc-importRequired.
pngpasteorg-downloadmacOS.
gimp*org-downloadUsed by org-download-edit.
libenchantjinxSpell checker.
libvtermvtermTerminal emulator in Emacs.
LibreOffice*doc-view[fn:1]For previewing documents.
math-previewmath-previewPreview math formulas inline.
ghostscriptdoc-viewPDF -> PNG
emacs-lsp-boosteremacs-lsp-boosterWrapper executable for LSP client.
prettier*format-allFormatter for many languages.

[fn:1] For more dependencies of doc-view package, use M-x find-library doc-view.

Check my personal dotfiles to see how I install external dependencies for Emacs: rennsax/dotfiles:modules/emacs/emacs-deps.nix.

tree-sitter

I download precompiled tree-sitter language grammars. Example commands:

VERSION=0.12.264
PLATFORM=macos
FILE=tree-sitter-grammars-${PLATFORM}-${VERSION}.tar.gz
wget https://github.com/emacs-tree-sitter/tree-sitter-langs/releases/download/${VERSION}/${FILE}
mkdir -p tree-sitter
tar xvf ${FILE} -C tree-sitter

You need to rename <LANGUAGE>.<SUFFIX> to libtree-sitter-<LANGUAGE>.<SUFFIX> then. It’s recommended to use the wdired package in Emacs to do this stuff (hint: C-x C-q in the dired buffer).

Fonts

Here lists the fonts that I personally use.

  • Monaspice: An innovative superfamily of fonts for code.
  • FiraCode: Free monospaced font with programming ligatures.
  • 更纱黑体: 极少数中英文宽度严格 2:1 的字体,适用于解决 org-table 对齐问题。

Misc.

Map CapsLock to Ctrl

It’s known that Emacs users (who respect vanilla key bindings) usually suffer from RIP after enjoying their Emacs journey for many years. The core leader of FSF, Richard Stallman, almost lost his ability to type because of RIP. See this interesting post. For those who rely on their typing skills to make a living, it’s rather important to take care of the finger health.

There are many suggestions for protecting your fingers from RIP. The most famous, or simplest suggestion, is to map CapsLock key to Ctrl. Emacs key bindings heavily reply on the Ctrl key, but the key is so far from our fingers while typing.

On macOS, we can easily set this: System Settings > Keyboard > Keyboard Shortcuts > Modifier Keys. You can also use the powerful Karabiner-Elements to configure your keyboard completely, which is my choice.

On Windows, you may find a lot of people teaching you to modify the Registry. It’s too complicated for me, though. I prefer to use Microsoft PowerToys to customize the keyboard.

On Linux, the routines vary from distros.

  • Ubuntu: Gnome Tweaks (gnome-tweaks from the cmd) -> Additional Layout Options -> Ctrl position -> Caps Lock as Ctrl.

Copyright Notice

The banner under the project name is a work from Celeste game asset, borrowed from Celeste Wiki, and licensed under CC BY-NC-SA 4.0 License. You may not use the material for commercial purposes.

I use this banner just because I’m a huge fan of Celeste game. If my actions infringe on any copyrights, please contact me and I will remove it. Thank a lot.

About

My Emacs configuration. 🍓

Resources

License

Stars

Watchers

Forks

Packages

No packages published