BlindingDark / emacs.d

My emacs configuration

Home Page:https://emacs.nasy.moe/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Emacs Configuration

Prologue

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/

NOTICE

  • Use straight.el to manage packages.
  • For macOS GUI.
  • Now only tested with GNU Emacs 26.2/27.0.50 of macOS 10.14.

Screenshots

./screenshot1.png

./screenshot2.png

./screenshot3.png

Dependencies

  • Emacs
  • git
  • make

Installation

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.

Updates

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.

Custom Configuration

Example Custom Configuration

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)

dashboard

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.

NOTICE:

  • Functions added to nasy/config-before-hook will be run before loading custom.el.
  • Functions added to nasy/config-after-hook will be run after init.

Features

Summary

Package Manager
straight.el with –depth=1
Font
Languages
  • lsp-mode/lsp-dap
  • Haskell
  • Python
  • Lisp
  • HTML/CSS/JavaScript/TypeScript
  • Rust
Themes
  • Doom Themes

The Configuration

See the complete literate config here:

Html

Source

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> @@.

Extra

Epilogue

Hope you enjoy it.

About

My emacs configuration

https://emacs.nasy.moe/


Languages

Language:Emacs Lisp 98.0%Language:Makefile 1.9%Language:YASnippet 0.1%