4.2 KiB
Emacs Configuration
Version 2 of my Emacs Configuration updated for Emacs 28.2. Most bindings are kept default. If there are binding changes they are listed here.
Clone this repo into your home directory using:
git clone git@git.xchg.sh:angrygoats/emacs-config.git .emacs.d
Nice Things
There are some things you should install locally:
- https://github.com/sharkdp/fd#installation. Projectile will use this automatically if installed.
- https://github.com/BurntSushi/ripgrep. Projectile will use this automatically if installed.
Troubleshooting
Occasionally there are issues with packages getting installed. Sometimes magit
for example will not install correctly. In init.el
you will find the
load-library
lines that load nearly everything in this configuration. The order is important. Where it breaks will usually help you binary-search your
way into the broken file.
Most problems, however, can be fixed by M-x load-file ~/.emacs.d/init.el
once more. This fixes problems caused by weird states during intiialization.
Alternatively you can always debug further or use package-install
to install packages you care about.
Server
By default init.el
spins up an Emacs server as it's last task. You can set EDITOR
to emacsclient
in order to use your existing
Emacs session quickly for tasks like mail (if you use a text-based mail editor). See this helpful documentation on using Emacs as a server.
Private Configurations
Sometimes you have certain things that a library might require but you don't want committed to your dotfiles. This git
project will ignore private.el
. You may put your private information in ~/.emacs.d/elisp/private.el
for it to be loaded.
IBuffer
ibuffer
has been configured to filter/folderize common things such as source code, magit, etc for easier management. To launch it, use C-x C-b
.
Markdown
For full use of the markdown mode you will need a markdown preprocessor installed such as pandoc or multimarkdown. The current configuration is set to use multimarkdown. You may wish to install it using your package manager.
Git
magit
is installed. Learn to use it.
Treemacs
A nice project/tree addin that works similar to eclipse. Launch using M-t
. Mouse navigation support is enabled.
Project Management
Projectile
is installed. You may learn more about how to use it here.
In addition you may use C-x f
to utilize projectile search in projects to help you find files faster.
Syntax Checking
flycheck
is installed. To list errors found by flycheck you can click the modeline
error indicator or type C-c ! l
to list them in a new buffer.
Switching Between Windows
To go forward and backward between windows the bindings have been changed to C-.
and C-,
respectively. Now,
you can simply hold control and press one more key in order to switch between windows easily. Additionally
you may use M-<arrow>
where <arrow>
is your left, right, up, or down arrow key in order to move between windows.
Languages
Python
Python support is implemented. You will want to install node
(for npm) and then:
npm install -g pyright
pyright
is used here because mspyls will be deprecated. lsp-pyright
gives us very good coverage. If you use .python-version
to denote
your pyenv
version you can M-x pyenv-activate-current-project
.
Lisp
SLIME
is installed and automatically configured to sbcl
. To evalute the current defun
in SLIME
press <f2>
. To evalute
the buffer press <f1>
.
Notes on SLIME
When starting you may get an error about an improper number of arguments being passed. Upon tracing the error you will see that
something in hyperspec.el
is causing an issue. The fix that worked for me is to manually run SLIME
via M-x slime
. After that
things will get compiled and use-package
will then proceed to work as normal. For a first installation even use-package
may fail.
In this case you will need to do M-x package-install
and type slime
to install SLIME
and then proceed with the fix.