before you use Petmacs, make sure your emacs version >= 29.1 and tree-sitter is enabled.
-
ComicCodeLigatures Nerd Font for default
-
Maple Mono SC NF for Chinese
-
Symbola for unicode
-
Nerd Icons for icons
if you want use nerd icons in terminal, make sure nerd fonts is used in your terminal.
install ripgrep and put it into your PATH
install fd and put it into your PATH
put nodejs binaries into your PATH
install rime
# use terra-pinyin for chinese input
sudo apt-get install librime-dev fcitx-rime
# install build tools
sudo apt-get install cmake libtool-bin make
if your cmake is too old, download the suitable version from cmake.org
please install emacs-lsp-booster installed and in you PATH
git clone https://github.com/Peter-Chou/petmacs.git ~/.emacs.d
if you are facing some certification verification problems while cloning repository by git, try use the following command and rerun emacs:
export GIT_SSL_NO_VERIFY=1
run the following command in emacs.
M-x treesit-auto-install-all
M-x eglot-upgrade-eglot
# in your python environment
pip install basedpyright
Please make sure java 21 is installed in /opt/jdk21
folder and run following commands in emacs.
M-x: eglot-java-upgrade-lsp-server
M-x: eglot-java-upgrade-junit-jar
use clangd
in LLVM project. soft link llvm project to /opt/llvm
.
or you can build it from source
sudo apt-get install build-essential ninja-build
llvm_version=llvmorg-19.1.7
git clone -b $llvm_version --depth=1 https://gitee.com/mirrors/LLVM.git $llvm_version
cd $llvm_version
cmake -S llvm -G Ninja -B build -DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_PROJECTS="clang;lld;clang-tools-extra;lldb" \
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
-DCMAKE_INSTALL_PREFIX=/opt/softwares/$llvm_version
cmake --build build -j $(nproc)
sudo $(which cmake) --install build
sudo ln -sf /opt/softwares/$llvm_version /opt/llvm
pip install debugpy
junit-platform-console-standalone is already installed in M-x: eglot-java-upgrade-junit-jar
command
lldb-dap (formerly lldb-vscode) is built and installed in section 3.3
petmacs use apheleia to format the buffer.
install ruff in your environment.
pip install ruff
# for java >= 11
npm install -g google-java-format
# for java 8
npm install -g [email protected]
clang-format
is already in LLVM project.
pip install cmakelang
sudo apt-get install pgformatter
npm install -g dprint
npm install -g prettier
formatter for json
, javascript
, typescript
, css
, scss
, html
, graphql
, markdown
, yaml
sudo apt-get install libxml2-utils
You can add your test config to init-mini.el and use the following command to ease your debug process.
emacs -Q -l ~/.emacs.d/init-mini.el