Skip to content

Jamie-Cui/emacs.d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

292 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Emacs.d

░▒▓████████▓▒░▒▓██████████████▓▒░ ░▒▓██████▓▒░ ░▒▓██████▓▒░ ░▒▓███████▓▒░
░▒▓█▓▒░      ░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░
░▒▓█▓▒░      ░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░      ░▒▓█▓▒░
░▒▓██████▓▒░ ░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓████████▓▒░▒▓█▓▒░       ░▒▓██████▓▒░
░▒▓█▓▒░      ░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░             ░▒▓█▓▒░
░▒▓█▓▒░      ░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░      ░▒▓█▓▒░
░▒▓████████▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓██████▓▒░░▒▓███████▓▒░

This repo is a personal GNU/Emacs configuration with two-level deferred loading, Evil mode, and gptel LLM integration. Targets Emacs 30.1+.

What this config does?

  1. Use melpa only.
  2. Use emacs version 30.1.
  3. Use Maple Mono NF CN (NO Ligature!): repo, download.
  4. Use Plantuml for uml drawing: download.
  5. Use emacs build-in tree-sitter.

Getting started

Ubuntu:

curl -sSL https://gist.githubusercontent.com/Jamie-Cui/e0c613bad06e17f34be591efb7615896/raw/00e86159e15191698f038d2be4367358f46fa66c/install-emacs-and-deps.sh | bash

Prerequisite

  • gcc toolchain (gcc, g++, cmake, makefile, autotools, …): compile environment
  • libgccjit: for emacs’s native compilation feature
  • libsqlite3: for org-roam database
  • libtree-sitter (tested with version 0.25.8, repo): for tree-sitter,
  • (optional) texlive: for latex
  • (optional) direnv: for separating project envs (sudo dnf install direnv)
# macos, if you have not done so, in ~/.zshrc
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/homebrew/lib/
# why tree-sitter@0.25? see: https://github.com/jdtsmith/emacs-mac/issues/121
brew install autoconf texinfo libgccjit gcc gnutls tree-sitter@0.25 pkg-config coreutils

Download and Compile Emacs

# download
wget -c https://github.com/emacs-mirror/emacs/archive/refs/tags/emacs-30.1.tar.gz
# or the following dev branch with tty-child-frame feature
wget -c https://github.com/emacs-mirror/emacs/archive/refs/heads/scratch/tty-child-frames.zip

# unzip and enter emacs folder
./autogen.sh
# (opt) configure terminal emacs
./configure --with-native-compilation --with-tree-sitter --with-gnutls --without-x-toolkit --without-xpm --without-gif --without-tiff --with-sqlite3 --without-pop --without-mailutils
# (opt) configure gui emacs with tiling window manager (WARNING: fcitx will not be avaliable inside emacs)
./configure --with-native-compilation --with-tree-sitter --with-sqlite3 --with-rsvg --without-pop --without-mailutils --without-x-toolkit
# (opt) configure gui emacs with gtk3 x toolkit
./configure --with-native-compilation --with-tree-sitter --with-sqlite3 --with-rsvg --without-pop --without-mailutils --with-x-toolkit=gtk3
# (opt) configure gui emacs with lucid x toolkit
./configure --with-native-compilation --with-tree-sitter --with-sqlite3 --with-rsvg --without-pop --without-mailutils --with-x-toolkit=lucid
# (opt) configure gui emacs with default x toolkit (for MacOS)
./configure --with-native-compilation --with-tree-sitter --with-sqlite3 --with-rsvg --without-pop --without-mailutils --with-x-toolkit
# compile
make -j
# install
sudo make install

MacOS: libgccjit failed to compile and run? see: d12frosted/homebrew-emacs-plus#680 (comment)

Have tree-sitter problem? see: link. Or download tree-sitter pre-built binaries here.

C/C++ Dev Tools

  • clangd, clang-format, clang-tidy
# ubuntu
sudo apt install clangd, clang-format, clang-tidy
# macos
brew install clangd, clang-format, clang-tidy
  • cpplint
pip3 install cpplint
  • cmake-format
pip3 install cmake-format
git clone https://github.com/universal-ctags/ctags.git --depth=1
cd ctags
./autogen.sh
./configure --prefix=$HOME/.local
make
make install

About

A personal Emacs configuration with two-level deferred loading, Evil mode, and gptel LLM integration. Targets Emacs 30.1+.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages