aboutsummaryrefslogtreecommitdiff
path: root/config/emacs/init.el
diff options
context:
space:
mode:
authorNicholas Rodrigues Lordello <[email protected]>2025-03-26 09:57:03 +0100
committerNicholas Rodrigues Lordello <[email protected]>2025-03-26 09:57:03 +0100
commit0417bbd340d9f5f425afb20b52886c75cd15521d (patch)
tree9d53682c90c6f58353a4fae2b1a091f764e0200a /config/emacs/init.el
parentae6f2a75c542c72df56b041a51a57c21c07f2414 (diff)
Refactored Emacs Initialization
We now have "flavours" - plain and development with additional supporting init files for each. Some packages are loaded as part of Sanemacs now as well.
Diffstat (limited to 'config/emacs/init.el')
-rw-r--r--config/emacs/init.el85
1 files changed, 14 insertions, 71 deletions
diff --git a/config/emacs/init.el b/config/emacs/init.el
index 9bc916d..e6ca9c3 100644
--- a/config/emacs/init.el
+++ b/config/emacs/init.el
@@ -1,80 +1,23 @@
;;; -*- lexical-binding: t -*-
;;; TODO(nlordell):
-;; 1. Update remaining init scripts:
-;; (load "~/.config/emacs/gtd.el" nil t)
-;; (load "~/.config/emacs/tree-sitter.el" nil t)
-;; 2. Emacs over devcontainers/docker with TRAMP
+;; 1. Emacs over devcontainers/docker with TRAMP
;; <https://happihacking.com/blog/posts/2023/dev-containers-emacs/>
-;; 3. Investigate other potential sane Emacs defaults
-;; <https://idiomdrottning.org/bad-emacs-defaults>
-;; 4. Setup GPTel - should be possible without FastGPT credits
+;; 2. Setup LLM coding: gptel, aidermacs
+;; 3. Try out neocaml - tree-sitter based
(load "~/.config/emacs/sanemacs.el" nil t)
-(load "~/.config/emacs/ligatures.el" nil t)
-;;;
-;;; General
-;;;
+(defcustom system-category 'plain
+ "The category of system.
-(use-package ace-window
- :bind
- (("C-x o" . ace-window)))
+ Allows initialization and customization differentiation with a
+ shared .emacs."
+ :type '(choice (const :tag "Plain" plain)
+ (const :tag "Development" development))
+ :group 'convenience)
-(use-package avy
- :bind
- (("C-:" . avy-goto-char)
- ("M-g f" . avy-goto-line)))
-
-(use-package ligature
- :config
- (ligature-set-ligatures 'prog-mode ligatures-berkeley-mono)
- (global-ligature-mode +1))
-
-(use-package magit
- :custom
- (transient-levels-file "~/.cache/emacs/transient/levels.el")
- (transient-values-file "~/.cache/emacs/transient/values.el")
- (transient-history-file "~/.cache/emacs/transient/history.el"))
-
-(use-package projectile
- :bind-keymap
- ("C-c p" . projectile-command-map)
- :custom
- (projectile-known-projects-file "~/.cache/emacs/projectile-bookmarks.eld")
- (projectile-project-search-path '(("~/Developer/" . 2)))
- :config
- (projectile-mode +1))
-
-(use-package undo-tree
- :custom
- (undo-tree-auto-save-history nil)
- :config
- (global-undo-tree-mode +1))
-
-(unless (fboundp 'which-key-mode)
- (use-package which-key
- :config
- (which-key-mode +1)))
-
-;;;
-;;; OCaml
-;;;
-
-(use-package tuareg)
-
-(use-package ocaml-eglot
- :after (tuareg)
- :hook
- (tuareg-mode . ocaml-eglot)
- (ocaml-eglot . eglot-ensure))
-
-;;;
-;;; macOS
-;;;
-
-(when (memq window-system '(mac ns))
- ;; Make the shell environement available when started on macOS Spotlight.
- (use-package exec-path-from-shell
- :config
- (exec-path-from-shell-initialize)))
+(when (eq system-category 'development)
+ (load "~/.config/emacs/config/development.el" nil t))
+(when (eq system-type 'darwin)
+ (load "~/.config/emacs/config/macos.el" nil t))