V2 Emacs config now kept as it's own repository.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
4.2 KiB

2 years ago
# Emacs Configuration
2 years ago
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:
1. [https://github.com/sharkdp/fd#installation](fd). Projectile will use this automatically if installed.
2. [https://github.com/BurntSushi/ripgrep](ripgrep). Projectile will use this automatically if installed.
2 years ago
![emacs screenshot](emacs.png)
1 year ago
## 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.
2 years ago
## 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](https://www.nongnu.org/emacsdoc-fr/manuel/emacs-server.html) 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`.
2 years ago
## 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](https://emacsair.me/2017/09/01/magit-walk-through/).
## Neotree
A nice tree is provided (with icons) by `Neotree`. You can toggle the tree by using ``C-```
## Project Management
`Projectile` is installed. You may learn more about how to use it [here](https://github.com/bbatsov/projectile).
1 year ago
In addition you may use `C-x f` to utilize projectile search in projects to help you find files faster.
2 years ago
## 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
2 years ago
`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.