Skip to content

Ziqi-Yang/.doom.d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

Prerequest

Git proxy (optional)

this configuration make sure your network connection is guranteed

git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy https://127.0.0.1:7890
# git config --global --unset http.proxy
# git config --global --unset https.proxy

Requirements

# doom requirement
sudo pacman -S ripgrap fd

# font
paru -S nerd-fonts-ibm-plex-mono # main font
paru -S ttf-zpix # mode line pixel font
paru -S ttf-lxgw-wenkai ttf-lxgw-wenkai-mono # doom-unicode-font: chinese font
# paru ttf-firacode-nerd

paru -S ltex-ls-bin  # lsp-ltex

sudo pacman -S wakatime # custom wakatime-mode package need

sudo pacman -S sqlite ripgrep # :lookup
paru -S wordnet-cli

npm install -g browser-sync # live web preview

sudo pacman -S texlive-most texlive-lang texlab biber # lsp latex

sudo pacman -S pandoc # org export

sudo pacman -S libvterm make cmake
# :check
# sudo pacman -S hunspell hunspell-en_us # spell
# sudo pacman -S languagetool # grammer (user experience is not very good)
# :lang
#
pip install pyright pytest nose black pyflakes isort # python(lsp)

# rust
rustup component add rustfmt-preview clippy-preview
cargo install cargo-check
paru -S rust-analyzer
# debug need debugger module and dap-cpptools

# c/cpp
paru -S clang ccls cmake
pip install cmake-language-server --user
paru -S rtags-git

# golang
go install github.com/x-motemen/gore/cmd/gore@latest
go install github.com/stamblerre/gocode@latest
go install golang.org/x/tools/cmd/godoc@latest
go install golang.org/x/tools/cmd/goimports@latest
go install golang.org/x/tools/cmd/gorename@latest
go install golang.org/x/tools/cmd/guru@latest
go install github.com/cweill/gotests/gotests@latest
go install github.com/fatih/gomodifytags@latest
paru -S golangci-lint-bin gopls

# rust
paru -S rustup rust-analyzer clang lld
rustup component add rustfmt-preview
cargo install cargo-check
rustup component add clippy-preview

# sh
paru -S shellcheck bash-language-server bashdb

# :tools
# debug
paru -S lldb lldb-mi-git gdb unzip
pip3 install ptvsd --user # debug python
pip3 install debugpy --user # debug python
# 'lldb run configuration' possibily appears only enable cc module in init.el
# first time run: M-x dap-gdb-lldb-setup
# first time run: M-x dap-cpptools-setup (need proxy: run emacs with proxychains,
# or set proxy environment variable(haven't try env))

doom installation

  1. install doom(don’t place this .doom.d directory before installation, otherwise there may be some problem for lsp)
    git clone --depth 1 https://github.com/doomemacs/doomemacs ~/.emacs.d_doom
    ln -sf ~/.emacs.d_doom ~/.emacs.d
    ~/.emacs.d/bin/doom install
        
  2. replace the generated .doom.d directory with this config directory
  3. Notice that the first time run doom emacs will consume a lot of CPU resources(do some native compiling in the background)

Common Issues

doom upgrade

couldn’t find remote ref refs/heads/master

log:

$ cd /home/zarkli/.emacs.d_doom/.local/straight/repos/with-editor/
$ git config --get remote.origin.url
https://github.com/magit/with-editor.git
[Return code: 0]
$ cd /home/zarkli/.emacs.d_doom/.local/straight/repos/with-editor/
$ git fetch origin
fatal: couldn't find remote ref refs/heads/master
[Return code: 128]

Possibly due to the source delete the master branch(and rename it to the main branch)

solution:

cd /home/zarkli/.emacs.d_doom/.local/straight/repos/with-editor/
git remote remove master
git remote add origin https://github.com/magit/with-editor.git

If there are too many exceptions occur during the upgrade, you can also try to simply remove the .emacs.d/.local/straight folder and then run the doom upgrade or doom sync -u command.

Failed to fetch from upstream

doomemacs/doomemacs#6598 (comment) possible solution

# .emacs.d
git remote remove _upgrade
git branch -D _upgrade_master

Org mode tips:

Tangle

  • #+auto_tangle: t to auto tangle when save file (org-auto-tangle package)
  • #+PROPERTY: header-args :tangle yes to set tangle property for all code blocks(?)

Note the #+ character has been hidden in the following code block.

#+auto_tangle: t
#+PROPERTY: header-args :tangle yes

Others’ Configuration

About

my doom emacs config

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published