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 17 is installed in /opt/jdk17
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 lld
llvm_version=llvmorg-18.1.1
git clone -b $llvm_version --depth=1 https://gitee.com/mirrors/LLVM.git
cd LLVM
cmake -S llvm -B build -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_LINKER=lld \
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lldb" \
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
-DCMAKE_INSTALL_PREFIX=/opt/llvm
cmake --build build -j $(nproc)
sudo $(which cmake) --install build
pip install debugpy
java-debug already been carried in ./data/lsp-java-jars/com.microsoft.java.debug.plugin-0.52.0.jar
lldb-dap (formerly lldb-vscode) is built and installed in section 3.3
lldb-vscode adapter in dape actually calls lldb-dap
petmacs use apheleia to format the buffer.
install ruff in your environment.
# for python linter and formatter
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 xmllint