Add following to ~/.emacs:
;; added by package.el
(package-initialize)
;; your path
(add-to-list 'load-path "/home/ahxxm/dev/emacs.d")
(require 'emacs-dealM)
All packages will be put inside plugins folder, git submodule is used for version control.
emacs-dealM.el is an entrypoint for modifying.
C-]: jump to matching parenF1: find file by nameF2: full-text grepC-x v z: magit-statusC-c C-c: comment current lineC-x u: revert buffer, the same askin magit statusC-z: undo
C-x 1: delete-other-windowsC-x 2: split-window-verticallyC-x 3: split-window-horizontallyC-x o: switch to another-window
C-c m: shows overview of current bufferC-c g: goto definitionC-x g: find implementations(C-c ialso works)F3: find referencesF5: Java organize import(also auto import missing class)C-c s: sideline mode(reference stack?), many information..
F4: projectile-invalidate-cache, in case project file changes
C-c M-j: start cider-replC-c C-k: load/eval the current buffer
Add following to ~/.lein/profiles.clj:
{:user {:middleware [cider-nrepl.plugin/middleware] :plugins [[cider/cider-nrepl "0.50.2" :exclusions [org.clojure/tools.namespace]]]}}
Install language server: GO111MODULE=on go get golang.org/x/tools/gopls@latest
Install language server:
npm i -g typescript-language-server; npm i -g typescript
JRE >=11 is required.
LSP Java works out of box: install server once, wait maven import after open project(check lsp-log buffer for progress).
If for some reason it does not work as expected, try:
cd ~/.emacs.d
rm -rf eclipse.jdt.ls/ workspace/and reopen project.
Lombok support requires ~/.m2/repository/org/projectlombok/lombok/1.18.8/lombok-1.18.8.jar.
Install language server in virtualenv: pip install 'python-language-server[all]'
Shell shortcuts:
alias ss='source ../.env/"${PWD##*/}"/bin/activate'
alias pss='python3 -m venv ../.env/"${PWD##*/}"'
alias pss2='virtualenv ../.env/"${PWD##*/}"'
alias rmss='rm -rf ../.env/"${PWD##*/}"'Install ccls, generate compile_commands.json in project root:
# compiledb works for sqlite and postgres https://github.com/nickdiego/compiledb
make | compiledb
# cmake, like mozjpeg
mkdir build && cd build
cmake .. -DZLIB_ROOT=/home/hi/dev/mozjpeg/zlib-1.2.11/build -BDebug -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=YES
cp Debug/compile_commands.json ../To update:
cd plugins/magit
git pull && make clean && make
cd ../plugins/transient
git pull && make clean && make
cd ../../- clojurescript-mode