Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/nykma/nema

Nayuki's EMAcs distro
https://github.com/nykma/nema

emacs emacs-configuration emacs-lisp

Last synced: 3 months ago
JSON representation

Nayuki's EMAcs distro

Lists

README

        

#+TITLE: NEMA - Nayuki's EMAcs config
#+AUTHOR: Nyk Ma

[[https://builds.sr.ht/~nykma/nema/test.yml.svg]] [[https://img.shields.io/badge/written%20with-nema-e298b6.svg]]

[[https://user-images.githubusercontent.com/1191636/74646301-85dc6c80-51b4-11ea-900e-3827ee42c979.png]]

* What's this?
:PROPERTIES:
:ID: 82195f31-e674-44a4-9ea8-cfd4c9e50f76
:END:

A not-so-hurt-yet-still-make-kind-of-sense emacs configuration set, c/w a bunch of packages.

* Goal
:PROPERTIES:
:ID: ca712775-4855-4d5a-844a-6bad3318844c
:END:

1. Any specific {package,variable} config should be found *no more than
2 layers* down from =init.el=.
2. I will *not* focus on "startup speed", since daemonize Emacs is
all you need.

* Usage
:PROPERTIES:
:ID: a8261d26-9246-483e-947a-c025b30b1170
:END:

#+BEGIN_SRC sh
cd ~
mv .emacs.d .emacs.d.old
git clone https://github.com/nykma/nema.git .emacs.d
emacs -nw
#+END_SRC

* Hotkey cheatsheet
:PROPERTIES:
:ID: 13729a39-5628-49a7-9f5c-eeb44f740985
:END:

| Hotkey | Command | Defined in | Comment |
|---------------+---------------------------------+--------------------+-----------------------------------------|
| =C-c g g= | =magit-status= | =nema-vcs.el= | =git status= |
| =C-c g b= | =magit-blame= | =nema-vcs.el= | =git blame= current buffer |
| =C-c g d= | =magit-diff-buffer-file= | =nema-vcs.el= | =git diff= current buffer |
| C-' | =avy-goto-char-timer= | =nema-basic.el= | Cursor jump to location |
| =C->= | =mc/mark-next-like-this-symbol= | =nema-basic.el= | Multi cursor (find next symbol) |
| =C-C= | =mc/edit-lines= | =nema-basic.el= | Multi cursor (add one cursor each line) |
| =M-S-RET= | =edwina-clone-window= | =nema-basic.el= | Provided by =edwina= |
| =M-i= | =nema-term= | =nema-terminal.el= | Start a terminal buffer |
| =C-c & w= | =aya-create= | =nema-snippet.el= | Create and use a snippet when editing |
| =C-M-o= | =ace-window= | =nema-basic.el= | Powerful window switch |
| =C-1= ~ =C-9= | =winum-select-window-1= | =nema-basic.el= | Quick window switch |

* Customize
:PROPERTIES:
:ID: 8ce125de-4d19-4799-8e7e-4f0b74cd24a1
:END:
** =customize-group=
:PROPERTIES:
:ID: fae603d9-92ad-441b-b5d0-ea66585523af
:END:
There is a customize group called =nema= to give you a few customization options. Remember to restart emacs
if anything is changed.
- =nema-use-evil= :: Whether or not to use evil-mode. Default to =nil=.
My evil-mode intergration is at a very basic level (since I don't use evil-mode). Any pull request is welcomed.
- =nema-emacs-completion-engine= :: Choose between =ivy=, =helm=, =vertico= and =ido=. Default to =ivy=
- =nema-lsp= :: Use LSP or not. Remember to follow server installation instructions below. Default to =nil=
- =nema-theme= :: Choose one theme from given pre-defined themes list.
- =nema-theme-style= :: Switch between dark and light mode of your theme (if supported).
- =nema-mode-line= :: Choose which mode line to use.
** Besides
:PROPERTIES:
:ID: 0ca56590-a5a1-47b9-9490-cdada286aa95
:END:
There are many ways to hack this. You can
1. Write your ELisp in =.emacs.d/my/*.el=. They will be loaded after all =nema-*= modules are loaded.
- Your YAS snippets will be saved and loaded in =.emacs.d/my/snippets/**/*=. (See =nema-snippet.el=)
- =.emacs.d/my/**/*= is in =.gitignore= list. So you can save sensitive data
(e.g. IRC login info or Mail account) or some machine-specific configs (e.g. if you have a HiDPI laptop
and a workstation with normal DPI displays) without syncing across with VCS.
- I've written some maybe-useful scripts in =my-sample/*.el=. Symlink (or copy) them into your =my/= folder to
enable them.
2. Fork me.

* LSP server installation
:PROPERTIES:
:ID: ef25f462-f4dc-4b9f-ade4-46263eeed5bf
:END:
See [[https://emacs-lsp.github.io/lsp-mode/page/languages][lsp-mode supported languages]]
* Known issues
:PROPERTIES:
:ID: 2b934e9b-d6ed-4ea2-b4a6-11132f40955d
:END:
1. If it is run at its first time, make sure not to use =emacs --server=, since it may prompt you
of Elisp-enabled themes warning or native plugin compilation. Use =emacs= or =emacs -nw= instead,
and press =y= if prompted. When =.emacs.d/custom.el= is built, you can use server mode without problem.

* Many thanks to
:PROPERTIES:
:ID: f4df7488-3c78-4286-8410-9be1cf233ab6
:END:

- [[https://github.com/emacs-tw/emacs-101-beginner-survival-guide][emacs-tw/emacs-101-beginner-survival-guide]] who gave me courage to build my very own config from scratch.
- [[https://github.com/kuanyui/.emacs.d][kuanyui/.emacs.d]] and [[https://github.com/purcell/emacs.d][purcell/emacs.d]] who provided a good project structure for reference.
- [[https://github.com/bbatsov/prelude][bbatsov/prelude]] who gave me ideas of how to do theme reloading properly.

* License
:PROPERTIES:
:ID: 3d7016a0-f323-4fcc-b480-ab16d6fefdb4
:END:
GPLv3 for
- Initialization and core files
- Layer files (=nema-*.el=)
- =my-sample/*.el=

See =LICENSE= file