aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshton Wiersdorf <mail@wiersdorf.dev>2023-08-17 10:53:32 -0600
committerAshton Wiersdorf <mail@wiersdorf.dev>2023-08-17 10:53:32 -0600
commitbdc282be9397b9ebd0444570040ce52a02c42d08 (patch)
treec09cc05c25afe5d08a4958fc0880d854dd0e11b1
parentac890acfa3b35237e8db75f03b480e2cf6eb49c8 (diff)
Update README; add (built-in) tree-sitter config and notes
-rw-r--r--README.md22
-rw-r--r--init.el8
-rw-r--r--mixins/dev.el31
-rw-r--r--mixins/org.el4
4 files changed, 43 insertions, 22 deletions
diff --git a/README.md b/README.md
index cf40961..66723a3 100644
--- a/README.md
+++ b/README.md
@@ -11,15 +11,9 @@ An *extremely* minimal Emacs starter kit uses *no* external packages by default,
- Mirrors:
- [GitHub](https://github.com/ashton314/emacs-bedrock)
-## Description
-
-**ACHTUNG!**
-
-This makes use of some Emacs 29.1 features! Fortunately these features should all be stable, but you will have serious troubles if you try using this unmodified on anything earlier. (Features: `help-quick`, built-in `use-package`.)
-
-For testing, you can run `emacs --init-directory path/to/emacs-bedrock/` and all the customizations and package installations will be isolated to the project directory. Emacs should only add files that are already in the `.gitignore`.
+**NOTICE:** Requires Emacs 29.1 or better.
---------------------------------------------------------------------------------
+## Description
This is a minimal Emacs starter kit. Like, *really* minimal. Here's the short of the philosophy:
@@ -52,20 +46,26 @@ This is where the meat of all configuration goes. This file:
- Set the default theme (`modus-vivendi`)
- Turn on discovery aids (e.g. `help-quick`, [which-key](https://github.com/justbur/emacs-which-key), etc.)
-### Mixins
+### Trying this out without committing too hard
+
+Emacs 29.1 added the handy `--init-directory` flag. This means that you can run `emacs --init-directory path/to/emacs-bedrock/` and all the customizations and package installations will be isolated to the project directory. Emacs should only add files that are already in the `.gitignore`.
+
+Once you're happy, you should just copy `init.el` and `early-init.el` to `~/.emacs.d/`.
+
+## Mixins
For those who'd like a little more help in tailoring Emacs for specific purposes, the `mixins/` folder contains a few files that can be included via `(load-file "mixin/mixin-name.el")` from the `init.el` file, or copied wholesale or in part into `init.el` directly.
Mixins:
- - UI Enhancements
+ - Base UI Enhancements
- Development tools
- Org-mode (in development)
- Vim refugee (in development)
- Email (TODO: mu4e, EBDB)
- Researcher (TODO: citar, denote, org-roam, LaTeX)
-#### `mixins/ui.el`
+#### `mixins/base.el`
Packages this mixin uses:
diff --git a/init.el b/init.el
index f7316d2..1140969 100644
--- a/init.el
+++ b/init.el
@@ -29,14 +29,14 @@
;; Package initialization
;;
-;; We'll stick to only GNU ELPA (Emacs Lisp Package Archive) for the base
-;; install, but there are some other ELPAs you could look at if you want more
-;; packages. MELPA in particular is very popular. See instructions at:
+;; We'll stick to the built-in GNU and non-GNU ELPAs (Emacs Lisp Package
+;; Archive) for the base install, but there are some other ELPAs you could look
+;; at if you want more packages. MELPA in particular is very popular. See
+;; instructions at:
;;
;; https://melpa.org/#/getting-started
;;
;; (with-eval-after-load 'package
-;; (add-to-list 'package-archives '("nongnu" . "https://elpa.nongnu.org/nongnu/"))
;; (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t))
;; If you want to turn off the welcome screen, uncomment this
diff --git a/mixins/dev.el b/mixins/dev.el
index 29db907..5817c17 100644
--- a/mixins/dev.el
+++ b/mixins/dev.el
@@ -5,8 +5,14 @@
;;; Usage: Append or require this file from init.el for some software
;;; development-focused packages.
;;;
-;;; It is **STRONGLY** recommended that you use the ui.el mixin if you want to
-;;; use eglot. Lots of completion things will work better.
+;;; It is **STRONGLY** recommended that you use the base.el mixin if you want to
+;;; use Eglot. Lots of completion things will work better.
+;;;
+;;; This will try to use tree-sitter modes for many languages. Please run
+;;;
+;;; M-x treesit-install-language-grammar
+;;;
+;;; Before trying to use a treesit mode.
;;; Contents:
;;;
@@ -22,7 +28,21 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(use-package emacs
+ :config
+ ;; Treesitter config
+
+ ;; Tell Emacs to prefer the treesitter mode
+ ;; You'll want to run the command `M-x treesit-install-language-grammar' before editing.
+ (setq major-mode-remap-alist
+ '((yaml-mode . yaml-ts-mode)
+ (bash-mode . bash-ts-mode)
+ (js2-mode . js-ts-mode)
+ (typescript-mode . typescript-ts-mode)
+ (json-mode . json-ts-mode)
+ (css-mode . css-ts-mode)
+ (python-mode . python-ts-mode)))
:hook
+ ;; Auto parenthesis matching
((prog-mode . electric-pair-mode)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -51,8 +71,9 @@
(use-package json-mode
:ensure t)
-;; You're almost certain to find a mode for the language you're looking for.
-;; Search the internet to find the right one.
+;; Emacs ships with a lot of popular programming language modes. If it's not
+;; built in, you're almost certain to find a mode for the language you're
+;; looking for with a quick Internet search.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
@@ -65,7 +86,7 @@
;; Configure hooks to automatically turn-on eglot for selected modes
; :hook
- ; ((python-mode . eglot))
+ ; (((python-mode ruby-mode elixir-mode) . eglot))
:custom
(eglot-send-changes-idle-time 0.1)
diff --git a/mixins/org.el b/mixins/org.el
index 1f708a0..0d02e24 100644
--- a/mixins/org.el
+++ b/mixins/org.el
@@ -33,8 +33,8 @@
;;; These variables need to be set for Org-mode's full power to be unlocked!
;;;
;;; You can read the documentation for any variable with `C-h v'. If you have
-;;; Consult configured (see the `ui.el' file) then it should help you find what
-;;; you're looking for.
+;;; Consult configured (see the `base.el' file) then it should help you find
+;;; what you're looking for.
;;; Phase 1 variables