On MacOS I install emacs using the homebrew-emacs-plus formula. To install follow the instructions in the README of the above git repo. For quick reference, you just need to run,
brew tap d12frosted/emacs-plus
brew install emacs-plug@29
# Create a link in Applications folder
osascript -e 'tell application "Finder" to make alias file to posix file "/usr/local/opt/emacs-plus@29/Emacs.app" at POSIX file "/Applications"'
Even though python is installed using xcode command line tools,
it has complications. So we will first install python again using
homebrew
brew install python
This would install python3 executable in the /usr/local/bin
directory.
On later MacOS versions, python
is not available as it was
meant for python2 which is deprecated. However, many emacs modes
assume python
executable to be available. In that case, create
a symlink to it
bin_dir=$(dirname $(which python3))
sudo ln -sv $bin_dir/python3 $bin_dir/python
Before anything, first upgrade the version of pip
python -m pip install -U pip
Now install the requirements
We need IPython because the python shell interpreter is configured to be “ipython”.
python -m pip install ipython
Flake8 is required as a backend for flycheck in python mode. Unless flake8 is installed, flycheck won’t work in python buffers. Once flake8 is installed, flycheck will start working automatically (no config is required).
python -m pip install flake8
This is used as lsp server
python -m pip install jedi-language-server
Since Python 3.3, venv module is built into python so virtualenv is not required. But it may be installed for older versions of python if required.
Follow the rust documentation to install rust on the machine.
The only external dependency for rust development is rust-analyzer. It can be installed using homebrew
rustup component add rust-analyzer
For rust development, we’re using 3 emacs modes:
rust-mode
: Provides indentation, syntax highlighting and integration with cargo, rustfmt (formatter) and clippy (lint)rustic
mode: Builds on top of the rust-mode and provides missing features. One of the thing thatrustic
does is configure eglot but I have disabed that and doing it separately instead for more control. So at this point, I am not sure what exactly isrustic
being used for.cargo
: To perform cargo tasks from emacsrust-playground
mode: Minor mode for quickly running snippets of code from within emacs as an alternative to the online rust playground - https://play.rust-lang.org
- Rustfmt indentation not consistent with emacs indentation
- Install pgformatter for formatting sql buffers
brew install pgformatter
brew install llvm
On macos, the default uuidgen
script generates UUIDs in
uppercase. For consistency, enforce lower case UUID generation by
copying the uuidgen-lower
provided in this repo
ln -sv bin/uuidgen-lower /usr/local/bin/
Graphviz can be handy for visualizing org-roam graph although org-roam-ui is a much better interface.
brew install graphviz
Note that graphviz is not required for org-roam-ui
Ledger needs to be installed
brew install ledger