# doom-config **Repository Path**: askzee/doom-config ## Basic Information - **Project Name**: doom-config - **Description**: Blazing fast Doom Emacs private configuration - **Primary Language**: Unknown - **License**: GPL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2024-12-05 - **Last Updated**: 2024-12-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #+TITLE: My private doom emacs config This is my private doom emacs configuration. Specifically configured for Javascript, Python, C++, Rust, and Go. * Table of Contents :TOC: - [[#screenshot][Screenshot]] - [[#installation][Installation]] - [[#step1-install-emacs][Step1: Install Emacs]] - [[#step2-install-doom-emacs][Step2: Install Doom Emacs]] - [[#step3-dependencies-and-configuration][Step3: Dependencies and Configuration]] - [[#features][Features]] - [[#configuration][Configuration]] - [[#appendix][Appendix]] - [[#ctags-reference][Ctags reference]] - [[#hacks][Hacks]] * Screenshot #+HTML: * Installation ** Step1: Install Emacs *** MacOS - *Method 1*: Use brew cask(Recommended) #+BEGIN_SRC shell brew tap railwaycat/emacsmacport brew cask install emacs-mac #+END_SRC - *Method 2*: Just brew, need compiling. (more customization) #+BEGIN_SRC shell brew tap railwaycat/emacsmacport rm -r /Applications/Emacs.app brew install emacs-mac --with-modules --with-natural-title-bar # create alias in /Applications ln -Fs `sudo find /usr/local/Cellar/emacs-mac -name "Emacs.app"` /Applications/Emacs.app #+END_SRC #+BEGIN_QUOTE Notes: (just for method 2) 1. natural-title-bar usage [[https://github.com/railwaycat/homebrew-emacsmacport/wiki/Natural-Title-Bar][here]]. 2. Solution to incoming network connection: Codesign your Emacs.app. Instructions over [[http://apple.stackexchange.com/questions/3271/how-to-get-rid-of-firewall-accept-incoming-connections-dialog/170566][here]]. ~codesign --deep --force --verbose --sign ztlevi /usr/local/opt/emacs-mac/Emacs.app~ #+END_QUOTE *** Linux #+BEGIN_SRC shell # Ubuntu emacs sudo add-apt-repository ppa:kelleyk/emacs sudo apt-get update sudo apt install emacs27 # Arch sudo pacman -S emacs #+END_SRC ** Step2: Install Doom Emacs #+BEGIN_SRC shell # Clone Doom Eemacs rm -r ~/.emacs.d git clone https://github.com/hlissner/doom-emacs -b develop ~/.emacs.d # Clone my config git clone https://github.com/ztlevi/doom-config ~/.doom.d ~/.emacs.d/bin/doom install #+END_SRC ** Step3: Dependencies and Configuration This Emacs configuration is written for Emacs 25.1+ on Mac OS X 10.11+ and Linux Arch. Windows users may need to tweak the config for themselves. *** Dependencies needed Install dependencies including search tools, utils, and linters. **** OS ***** MacOS #+BEGIN_SRC sh :tangle (if (doom-system-os 'macos) "yes") # search tool brew install ripgrep grep exa zstd ctags fd # utils brew install sqlite hub gpg2 coreutils gnu-tar mplayer direnv libtool # language brew install shellcheck aspell languagetool clang-format # Cask brew cask install xquartz #+END_SRC ***** Arch Linux #+BEGIN_SRC sh :dir /sudo:: :tangle (if (doom-system-os 'arch) "yes") sudo pacman --needed --noconfirm -S sqlite ripgrep fd wmctrl exa languagetool zstd ctags #+END_SRC Note: for windows users, [[http://aspell.net/win32/][aspell]] is used instead. ripgrep can be installed via [[https://chocolatey.org/][choco]] ***** Ubuntu #+BEGIN_SRC shell # Install linuxbrew sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)" # Then follow the macos installaion guide except the Cask part #+END_SRC - For vterm #+BEGIN_SRC shell brew install cmake sudo apt install libvterm-dev libtool-bin #+END_SRC **** npm #+BEGIN_SRC shell npm install -g cspell prettier import-js #+END_SRC **** pip #+BEGIN_SRC shell python3 -m pip install --upgrade pylint gnureadline black grip cpplint #+END_SRC **** go: This module requires a valid ~GOPATH~, and the following Go packages: #+BEGIN_SRC shell # macos brew install go # arch sudo pacman --needed --noconfirm -S go #+END_SRC *** Language Server Protocol: Install the [[https://langserver.org/][lsp]] for your languages. A few examples are listed below. #+BEGIN_SRC shell # python # for msplys M-x lsp-python-ms-update-server, and remove `lsp-python-ms` from `packages.el`->disable-packages! # for pyls, anaconda pip fails on Arch Linux. I need to use system pip (/usr/bin/pip3) instead pip3 install --user --upgrade 'python-language-server[all]' pyls-mypy pyls-isort # Bash npm i -g bash-language-server # ccls: https://github.com/MaskRay/ccls/wiki/Getting-started brew tap twlz0ne/homebrew-ccls brew install ccls # Rust rustup update rustup component add rls rust-analysis rust-src # Javascript npm i -g typescript # Vue npm install vue-language-server -g # gopls go get -u golang.org/x/tools/gopls #+END_SRC *** For MacOS, according to the discussion [[https://emacs-china.org/t/topic/6453/6][here]], the following codes will speed up Emacs GUI startup time. #+BEGIN_SRC bash defaults write org.gnu.Emacs Emacs.ToolBar -string no defaults write org.gnu.Emacs Emacs.ScrollBar -string no defaults write org.gnu.Emacs Emacs.MenuBar -string no #+END_SRC * Features An in-depth list of features, how to use them, and their dependencies. * Configuration How to configure this module, including common problems and how to address them. * Appendix ** [[https://gist.github.com/redguardtoo/b12ddae3b8010a276e9b][Ctags reference]] ** Hacks + Include a list of ways this module changes default behavior