.emacs.d
My Emacs configuration.
Beware: under heavy development and change — I'm still feeling like I have to learn how to best structure this configuration.
Emacs
Install emacs-plus:
brew tap d12frosted/emacs-plus
brew install emacs-plus --without-spacemacs-icon --with-24bit-color --with-natural-title-bar
Additional Setup
Code Navigation
- Install GNU GLOBAL with CTAGS:
brew install global --with-ctags - Install pygments:
pip install pygments
Time Tracking
- Install Wakatime
pip3 install wakatime
C++ Code-Completion (CCLS)
- Install CCLS:
brew tap twlz0ne/homebrew-ccls; brew install ccls - Generate
compile_commands.json(using XcodeCompilationDatabase or bear
C++ Code-Completion (Irony + RTags)
- Install LLVM:
brew install llvm - Install Irony from within Emacs:
M-x irony-install-server
You may need to change the command to:
CMAKE
-DLIBCLANG_INCLUDE_DIR\=/usr/local/opt/llvm/include/
-DLIBCLANG_LIBRARY\=/usr/local/opt/llvm/lib/libclang.dylib
-DCMAKE_INSTALL_PREFIX\=/Users/gs/.emacs.d/irony/
/Users/gs/.emacs.d/elpa/irony-20170523.618/server
&&
cmake --build . --use-stderr --config Release --target install
RTags
- Install rtags:
M-x rtags-install cd ~/.emacs.d/elpa/rtags-20180619.823/rtags-2.18make install
Before using RTags, start the rtags daemon with rdm &.
A.) You then need to start the rtags client daemon (rc) from within your
project root: make -nk | rc -c -
B.) If you have a compile_commands.json file in your project root, you can start
the rtags daemon with rc -J.
Generate compile_commands.json
Or provide compile_commands.json and start with .
You can use xcpretty on macOS or
bear on other plattforms:
xcodebuild | xcpretty -r json-compilation-database -o compile_commands.json
Generate .clang_complete
Install https://github.com/Rip-Rip/clang_complete and use it to generate
.clang_compile file by:
cd ~/.vim/bin/
chmod +x cc_args.py
cd $YOUR_PROJECT_DIR
make CC='~/.vim/bin/cc_args.py gcc' CXX='~/.vim/bin/cc_args.py g++' -BC++ Code-Completion (YouCompleteMe)
- Clone the YouCompleteMe reop as a submodule:
git submodule update --init --recursiveto cloneycmdrepo into/ycmddir. - Build YouCompleteMe:
cd ~/.emacs.d/ycmd&./build.py --clang-completer
brew install --HEAD universal-ctags/universal-ctags/universal-ctags
Python Code-Completion (Jedi)
- Install virtualenv:
pip3 install virtualenv - Install Jedi from within Emacs:
M-x jedi:install-serverInstall the jedi server
Javascript Code-Completion (Tern)
- Configure Tern (copy
configs/external/.tern-configfile into your$HOMEdir):
Swift Code-Completion (SourceKittenDaemon)
- Install SourceKittenDaemon
🐱
Haskell Code-Completion (Intero)
- Install *Docker:
brew install dockerto use intero - Install *Stack:
brew install stack - Setup Stack via
stack setup
Make sure to use ghc version larger than 8.2.1. Intero seems to fail an 8.0.2
according to this github
issue
Spell-Checking
Install aspell via brew install aspell
