As this is my fully-featured configuration for Emacs, you will find everything and some quirks around here. Looking for something simpler? Check the last section of this document (Other Configurations).
I can’t possibly walk you through all my thought processes, especially when designing new features like a shortcut to quickly find a project folder, add it as a Project, and open it, or explaining why I have tabs configured the way they are (tmux-like), or why my persp-mode is set up as a session manager (again, tmux-like).
That said, I encourage readers to explore lemacs-init.org. Yes, LEmacs is now a literate configuration that you can read through, gradually discovering things to use (or ideas to borrow).
Here are some examples of what you might find here:
LEmacs Splash Screen:
- Splash Screen:
- Elfeed for RSS Feed Reading:
(yep, before programming, I’ll show you some other stuff).
- EWW Web Wowser:
- EMMS for playing multimedia:
- Yeetube for playing youtube:
- LEmacs defcustoms:
Do you prefer Emacs default keybindings? Change a toggle.
Don’t want nerd-icons? Change a toggle.
Prefer Eglot over LSP-Mode? Change a toggle.
Explore these customizable options! ;)
- Programming:
Here we have Next.JS / React.JS app written on Typescript.
All the modern goodies: Treesitter, LSP Server, Diff Highlights, and more:
- Hovering Docs:
- Completion with documentation using Corfu:
- Jumping trough errors with Flymake and Consult:
- Grepping with grep or rg and Consult for navigating:
- Finding files in a project:
- Tree navigation with Treemacs:
And many more… AI Assistance, Containers manipulation, IRC Chat, and so on…
This configuration is crafted to deliver a seamless and delightful Emacs experience, whether you’re navigating through the Text User Interface (TUI) or the Graphical User Interface (GUI). It’s designed to excel in both standalone mode and as a daemon/client setup.
This means (of course to my personal taste and opinions) that I will prefer packages that support both Terminal and Graphics, so you may never be worried about where to use Emacs or other editors.
You can use Emacs, everywhere, always ;)
Ensure you have Emacs version 30 or higher, compiled with native compilation, JSON, and tree-sitter support.
emacs --version
emacs -nw -q --batch --eval '(message system-configuration-options)'
To use LSP (and also node/typescript/eslint, prettier), you can install Node JS globally or use a version management tool, in the case you have several projects with several node versions it is common to use **nvm** or **asdf**. I recommend to install Node JS via **asdf** (https://asdf-vm.com/).
Note: asdf must be loaded on .bash_profile for macos, and .bashrc for Linux, for testing (after Lemacs install), run eshell and look at **asdf –version** output.
You need to Install globally (and for every every asdf plugin shim if you’re using asdf):
npm i -g vscode-langservers-extracted prettier
npm i -g typescript-language-server typescript
npm i -g eslint
Make a backup of your ~/.emacs.d/, ~/.emacs files and delete them, recommended:
cp -r ~/.emacs.d/ ~/.emacs.d_backup
cp ~/.emacs ~/.emacs_backup
rm -rf ~/.emacs.d ~/.emacs
Now, let’s get you set up:
git clone https://github.com/LionyxML/LEmacs ~/.emacs.d
emacs -nw --eval="(lemacs/first-install)"
If anything goes awry, exit and restart the installation script. If all goes smoothly, you’ll be back at your shell prompt.
Launch Emacs, whether from the GUI or TUI (emacs -nw or emacs), and you’re good to roll!
It’s always a good idea to run **M-x lsp-doctor** to check that everything is working.
This might be necessary when dealing with NodeJS, watches, etc:
echo fs.inotify.max_user_watches=393210 \
| sudo tee -a /etc/sysctl.conf \
&& sudo sysctl -p
If you’re experiencing UI freezes in Emacs, here’s a handy way to pinpoint the culprit:
M-x profiler-start
;; choose CPU
;; do stuff and make the UI freeze
M-x profiler-stop
M-x profiler-report
This will help you identify what’s causing the slowdown. Pay attention to the profiler report for insights into resource-intensive operations.
It’s worth noting that this configuration makes native compilation asynchronous. Consequently, the first time you use a package, there might be a background process compiling it. Check for any Async-native-compile-log buffers using:
M-x ibuffer
Inspect these buffers to ensure that compilation processes are running as expected.
If you’re wondering, “Why not X feature?”—great question!
Open an issue on our GitHub repository, and let’s dive into the discussion. I am open to exploring new additions or substitutions.
Before everything, this is optional, but may help on reducing troubleshooting time:
sudo apt-get build-dep emacs
Take a look on the repo first to make sure Emacs on master branch matches the above version requirement.
git clone git://git.savannah.gnu.org/emacs.git
./configure --with-native-compilation=aot --with-tree-sitter --with-gif --with-png --with-jpeg --with-rsvg --with-tiff --with-imagemagick --with-x-toolkit=lucid --with-mailutils
make clean
make -j8
sudo make install
For Debian or Debian based Distros, such as Ubuntu and it’s derivatives.
sudo apt install emacs
Check the installed version with:
emacs --version
On MacOS compiling with a brew formulae is the recommendated way:
brew install \
--ignore-dependencies \
emacs-plus@30 \
--with-native-comp \
--with-xwidgets \
--with-imagemagick \
--with-mailutils \
--with-poll \
--with-no-frame-refocus
- Do you need something simpler like a Kickstart configuration you can build on the top of it? Moving from neovim? Fear no more! Take a look at: https://github.com/LionyxML/emacs-kick
- Would you like to explore how far you can go with only Emacs? No external packages? Raw Emacs-Lisp? Take a look at **EMACS-SOLO** my experimental configuration that aims exactly that: https://github.com/LionyxML/emacs-solo