Rangoli Emacs is an Emacs configuration. You can use this as a starting point, and personalize and add your own desired functionality.
Make a holy minimal readable alternative to spacemacs and doom-emacs.
- Emacs, not vim
- I tried very hard to get used to evil-mode on top of emacs, but I just find the experience of two different ways of working very confusing, for example, I use OrgMode 90% of the time I’m using Emacs, and editing that is in the Emacs way, and then everything else such as navigating and reading codebases is in the evil-mode way. I just couldn’t come to terms with this. I wanted something like spacemacs or doom-emacs but as Emacs, not as vim.
- Minimal
- As much as I liked using persp-mode & layouts, I felt just using multiple frames (GUI windows) was a simpler equivalent without adding that much more complexity. I wanted a distribution that was minimal enough that I could read the entire codebase. This also meant not having every permutation of possible features, e.g. supporting both helm and ivy. Just pick one, and optimize on it.
- Readable
- I have contributed a few pull requests to spacemacs in the past (including the commonly used system-info command), but over time, I realized that I couldn’t debug my own issues because I struggled to read spacemacs codebase. I really wish it was more simpler and readable. I guess this is the curse of Lisp in action again.
- Contribute to packages
- Many a time, I wish to fix or improve the packages used by the configuration I’m using, and that’s usually not simple to achieve and maintain a reproducible config at the same time. This is where I find straight.el promising, and I wanted to build a configuration based on that. I love the forking repo option.
Some more details:
- Yes, I know that spacemacs has holy-mode, but the other points above still remain!
- Yes, I know there are others such as prelude, but I wanted something that had the excellent hierarchical menu that spacemacs revolutionized, I wanted most commands under
M-m
(leader key) andM-n
(major-mode leader key). - Also, I wanted all programming-related functionality to be LSP-centric. LSP is awesome.
Because rangoli, the art form, uses simple ingredients, uses simple structure, is colorful, is drawn from scratch, can be easily personalized, and can be as simple or as elaborate as you want it to be.
Rangoli is an art form, originating in the Indian subcontinent, in which patterns are created on the floor or the ground using materials such as colored rice, dry flour, colored sand or flower petals. It is usually made during Diwali or Tihar, Onam, Pongal and other Hindu festivals in the Indian subcontinent. Designs are passed from one generation to the next, keeping both the art form and the tradition alive.
The purpose of rangoli is decoration, and it is thought to bring good luck. Design depictions may also vary as they reflect traditions, folklore, and practices that are unique to each area.
…
Rangoli designs can be simple geometric shapes, deity impressions, or flower and petal shapes (appropriate for the given celebrations), but they can also be very elaborate designs crafted by numerous people.
Here’s one example:
(photo reused under Creative Commons BY-NC-SA 2.0 license)
Also, from the Wikipedia page:
In Maharashtra and Karnataka, rangolis are drawn on the doors of homes so that evil[1] forces attempting to enter are repelled.
[1] read “evil” as “evil-mode”!
Just kidding. I love what the evil-mode community has achieved and full respects to them.
- I use this config with the latest development version of Emacs (unreleased Emacs 27) because:
- Emacs 27 comes with Jansson JSON C library built-in, and LSP mode relies heavily on sending JSON messages to and fro the language servers, so LSP mode works way more faster with Jansson library.
- Other benefits such as latest bug fixes, and minor improvements such as standardizing on
~/.config/emacs/
directory instead of~/.emacs.d/
directory, etc.
- Tested on Ubuntu Linux 19.04 (Pop! OS) and macOS Mojave (10.14).
- Not tested on Windows. We welcome community contributions to get it working on Windows.
sudo apt remove emacs-snapshot emacs-snapshot-common emacs-snapshot-el
sudo apt install build-essential libjansson-dev
# https://git.launchpad.net/~ubuntu-elisp/emacs/tree/debian/control
sudo apt install autoconf automake autotools-dev debhelper dpkg-dev imagemagick libacl1-dev libasound2-dev libdbus-1-dev libgconf2-dev libgif-dev libgnutls28-dev libgpm-dev libgtk-3-dev libjpeg-dev liblockfile-dev libm17n-dev libmagick++-dev libncurses5-dev libotf-dev libpng-dev librsvg2-dev libselinux1-dev libsystemd-dev libtiff5-dev libwebkit2gtk-4.0-dev libxaw7-dev libxml2-dev sharutils texinfo xaw3dg-dev
sudo apt-get build-dep emacs
mkdir -p ~/code
cd ~/code
rm -rf emacs
time git clone https://git.savannah.gnu.org/git/emacs.git
cd emacs
time ./autogen.sh
time ./configure --with-modules --with-json --with-xwidgets --with-imagemagick --with-mailutils
time make -j9
time sudo make install
brew tap d12frosted/emacs-plus
brew install emacs-plus --HEAD --without-spacemacs-icon --with-jansson --with-mailutils
ln -sfv /usr/local/opt/emacs-plus/Emacs.app /Applications
mkdir -p ~/.config/
git clone https://github.com/swaroopch/rangoli-emacs.git ~/.config/emacs
sudo apt install fonts-noto-mono
brew cask install homebrew/cask-fonts/font-noto-mono
brew install terminal-notifier
M-x all-the-icons-install-fonts
NOTE: M
stands for meta which is alt
/ option
key on your keyboard.
The magic is that most keys are under M-m
, and major mode-specific keys are under M-n
.
There are two options:
You can make a personal copy of this repository by forking the repository, and then customize it however you wish!
Preferably, add your own personal modules, so that when you want to pull in recent changes from this base repository, you will not get conflicts.
You can create your own emacs configuration, and call whichever modules from this base repository that you wish.
For example, assuming you have cloned this repository to ~/rangoli-emacs
, here’s a minimal ~/.config/emacs/init.el
:
;;; Straight bootstrap
;; https://github.com/raxod502/straight.el
(setq straight-repository-branch "develop"
straight-enable-use-package-integration nil)
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
;;; Features
(add-to-list 'load-path "~/rangoli-emacs/features/")
;; Use only what you want from rangoli-emacs
(require 'rangoli-core)
(require 'rangoli-config)
(require 'rangoli-keybindings)
(require 'rangoli-ui)
(require 'rangoli-org)
(require 'rangoli-markdown)
;; Add whatever functionality you wish!
- Install
pyenv
to$HOME/.pyenv
- To set the correct virtualenv interactively for a given project, use
M-n v p
. - To set the correct virtualenv automatically for a given project, add a directory local variable (use
M-m i d
), such as:;;; Directory Local Variables ;;; For more information see (info "(emacs) Directory Variables") ((python-mode . ((pyvenv-workon . "secretproject"))))
Install the Python language server:
pip install -U 'python-language-server[all]'
# M-x eshell cd ~/.config/emacs/straight/repos/org find-file local.mk # macOS EMACS = /Applications/Emacs.app/Contents/MacOS/Emacs lispdir = /Users/swaroop/.config/emacs/straight/repos/org/lisp # Linux EMACS = /usr/local/bin/emacs lispdir = /home/swaroop/.config/emacs/straight/repos/org/lisp # save file (=M-m f s=) and close buffer (=M-m b d=) make autoloads # Restart Emacs
If that doesn’t work, try:
cd ~/.config/emacs && find . -name *.elc -print0 | xargs -0 rm
M-x straight-rebuild-all
Hence it was removed.