A Straightforward Emacs Configuration Bundle.
This is my Emacs configuration in literate form, and it is towards macOS. I am not sure if it would work well well on Linux or Windows.
- My Blog
- https://nasy.moe/
- Complete Literate Configuration
- https://emacs.nasy.moe/
- Use straight.el to manage packages.
- For macOS GUI.
- Now only tested with GNU Emacs 26.2/27.0.50 of macOS 10.14.
- Emacs
- git
- make
- …
To install, clone this repo to @@html: <span> @@ ~~/.emacs.d~ @@html: </span> @@:
git clone https://github.com/nasyxx/emacs.d.git ~/.emacs.d
make generate
Upon the first time staring up emacs, other third-party packages will be
automatically clone to the @@html: <span>@@ straight
: @@html: </span>@@ folder
and installed. If you encounter any errors at that stage, try restarting Emacs,
and maybe running make clean-build
before doing so.
You can regenerate @@html: <span>@@ init.el
@@html: </span>@@ by make generate
.
Update this config with running make update
or git pull
after a make
clean-build
and restart Emacs.
And I guess you’ll need to update third-party packages regularly too if you
have not modificated the straight-check-for-modifications
in @@html: <span> @@
config/nasy-config.el
: @@html: </span>@@
- @@html:<kbd>M-x</kbd> <kbd>straight-pull-all</kbd> <kbd>RET</kbd>@@
- @@html:<kbd>M-x</kbd> <kbd>straight-rebuild-all</kbd> <kbd>RET</kbd>@@
If you encounter any errors while updating, you may need to kill Emacs and run
make clean
. If you still meet errors after doing that, you probably need to run
make clean-all
and restart Emacs.
To add your own customization, use @@html: <kbd>M-x</kbd> <kbd>customize</kbd> @@
etc. and/or create a file @@html: <span> @@ custom/user-config.el
@@html:
</span> @@ which looks like this (when you make
or make generate
, below will
generate to @@html: <span> @@ custom/user-config-example.el
@@html: </span> @@):
(setq-default
;;calendar-latitude 24.8801
;;calendar-longitude 102.8329
;;user-mail-address "nasyxx@gmail.com"
;;initial-buffer-choice #'(lambda () (get-buffer "*dashboard*"))
;;diary-file ~/dairy/emacs-dairy
gcmh-high-cons-threshold #x40000000
*theme* 'nasy
*debug* t
*struct-hs* nil
;;*vterm* t
*risky-var* nil
*dvorak* nil
*dvorak-trans* nil
*font-cjk* "Kaiti SC"
*font-weight-cjk* 'normal)
(provide 'user-config-example)
If you want to start with dashboard, you need to set
(setq initial-buffer-choice #'(lambda () (get-buffer "*dashboard*"))
in your custom/user-config.el
.
Launching emacs from command line with a file name causes errors. Please refer to the issue here. Hope someone could fix it.
- Functions added to
nasy/config-before-hook
will be run before loadingcustom.el
. - Functions added to
nasy/config-after-hook
will be run after init.
- Package Manager
- straight.el with –depth=1
- Font
-
- Adjust with cnfonts
- Operator Mono SSm
- Patched with nerd-font and operator-mono-lig.
- Fira Code Symbol
- Languages
-
- lsp-mode/lsp-dap
- Haskell
- Python
- Lisp
- HTML/CSS/JavaScript/TypeScript
- Rust
- Themes
-
- Doom Themes
See the complete literate config here:
One thing to note is that this file generates a file named @@html: <span> @@
init.el
. @@html: </span> @@ You should not edit that file directly and make any
changes here and regenerate it from Emacs org-mode using @@html: <kbd>C-c</kbd>
<kbd>C-v</kbd> <kbd>t</kbd> @@.
Hope you enjoy it.