chuxubank / .doom.d

A simple config for doom-emacs, works on macOS, iOS/iPadOS and Windows via MSYS2/WSL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Misaka’s doom-emacs config

Basic Usage

cd ~
git clone --depth 1 https://github.com/hlissner/doom-emacs .emacs.d
git clone https://github.com/chuxubank/.doom.d.git
~/.emacs.d/bin/doom install

You can then add ~/.emacs.d/bin/doom to your PATH environment.

macOS

File sync

cd ~
ln -s ~/Library/Mobile\ Documents/iCloud~com~appsonthemove~beorg/Documents/org org
ln -s ~/Library/Mobile\ Documents/3L68KQB4HG\~com\~readdle\~CommonDocuments/Documents PDFs

Install tools

brew install fd ripgrep sqlite

Rime

cd ~/Downloads
librime_version=1.7.3
wget -N https://github.com/rime/librime/releases/download/${librime_version}/rime-${librime_version}-osx.zip
unzip -o rime-${librime_version}-osx.zip -d ~/librime
rm -rf rime-${librime_version}-osx.zip

iOS/iPadOS

https://mirror.tuna.tsinghua.edu.cn/alpine/edge/main
https://mirror.tuna.tsinghua.edu.cn/alpine/edge/community

Install tools

apk install fd ripgrep sqlite

Windows

Native

PowerShell Config

Set-PSReadLineOption -EditMode Emacs

MSYS2

Install MSYS2.

  • set MSYS2_PATH_TYPE=inherit in Windows environment.
  • set MSYS2_ARG_CONV_EXCL=--path-separator in Windows environment. (fix the fd and rg path issue in msys2)

I use mingw64 terminal as my default one, which has all path in environment and no more config needed (It defines the HOME and SHELL environment).

pacman -S pactoys base-devel # pactoys use shortcut to install mingw64 packages, base-devel is needed by pdf-tools and emacs-rime
pacboy -S emacs:x toolchain:x librime:x librime-data:x aspell-en:x python-pylint:x clang:x clang-tools-extra:x libc++:x

Install tools

scoop install aria2 # speed up the download
scoop bucket add extras
scoop install sharpkeys # swipe Caps Lock and left Ctrl
scoop install fd ripgrep editorconfig plantuml openjdk latex
scoop bucket add nerd-fonts
scoop install sarasagothic-ttc

GUI shortcut

You can add a shortcut to C:\msys64\mingw64\bin\runemacs.exe and rename the shortcut to Emacs, then changing the Start in: property to the path you want to start.

File sync

ln -s ~/iCloudDrive/iCloud\~com\~appsonthemove\~beorg/org org
ln -s ~/iCloudDrive/3L68KQB4HG\~com\~readdle\~CommonDocuments/ PDFs

UTF-8

In the Control Panel\Clock and Region -> Region -> Administrative -> Change system locale... -> [x] Beta: Use Unicode UTF-8 for worldwide language support.

ArchWSL

Install tools

scoop install archwsl vcxsrv chrome

WSL system setting

Display
sudo pacman -S noto-fonts-cjk noto-fonts-emoji noto-fonts-extra ttf-fira-code ttf-dejavu

Ref: https://wiki.archlinux.org/index.php/Locale

Install tools
sudo pacman -S git github-cli fd ripgrep sqlite xdg-utils mailcap base-devel texlive-core texlive-pictures texlive-langchinese texlive-latexextra librime poppler-data aspell aspell-en texlab graphviz

Ref: https://wiki.archlinux.org/index.php/default_applications https://github.com/4U6U57/wsl-open/blob/master/DESIGN.md

Detect

(string-match "-[Mm]icrosoft" operating-system-release)
;; WSL: WSL1 has "-Microsoft", WSL2 has "-microsoft-standard"
(string-match-p "Microsoft" (shell-command-to-string "uname -a"))

Ref: https://emacs.stackexchange.com/a/55295

Config (WSL1)

# doom-emacs
export PATH="$HOME/.emacs.d/bin:$PATH"

# display
export DISPLAY=:0.0
export LIBGL_ALWAYS_INDIRECT=1
export BROWSER=chrome.exe

# audio
export PULSE_SERVER=tcp:localhost

Ref: https://docs.microsoft.com/en-us/windows/wsl/interop#wslenv-flags

About

A simple config for doom-emacs, works on macOS, iOS/iPadOS and Windows via MSYS2/WSL


Languages

Language:Emacs Lisp 98.7%Language:Mathematica 1.1%Language:Shell 0.2%