aboutsummaryrefslogtreecommitdiff
path: root/config/emacs/init.el
diff options
context:
space:
mode:
authorNicholas Rodrigues Lordello <[email protected]>2025-03-16 21:40:38 +0100
committerNicholas Rodrigues Lordello <[email protected]>2025-03-16 21:40:38 +0100
commit7604c5aeef469e51e8dd19a514b883e415f462fb (patch)
tree3f44485cc6fc1181fc9200266e796607b5bc3538 /config/emacs/init.el
parentb9d7af835c5e1cecf11f852dd033f48fac829d07 (diff)
More Emacs Customization
Refactored init.el, got rid of modal editing and added a few more useful packages. Ported code to `lexical-binding: t`.
Diffstat (limited to 'config/emacs/init.el')
-rw-r--r--config/emacs/init.el89
1 files changed, 66 insertions, 23 deletions
diff --git a/config/emacs/init.el b/config/emacs/init.el
index d39a80b..9de677e 100644
--- a/config/emacs/init.el
+++ b/config/emacs/init.el
@@ -1,46 +1,89 @@
+;;; -*- lexical-binding:t -*-
+
+;;; TODO(nlordell):
+;; 1. Update remaining init scripts:
+;; (load "~/.config/emacs/gtd.el" nil t)
+;; 2. 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
+;; 5. Resolve ELisp lint issues from Flycheck
+
(load "~/.config/emacs/sanemacs.el" nil t)
(load "~/.config/emacs/ligatures.el" nil t)
-(load "~/.config/emacs/meow.el" nil t)
+
+;;;
+;;; General
+;;;
+
+(use-package ace-window
+ :bind
+ (("C-c o" . ace-window)))
+
+(use-package avy
+ :bind
+ (("C-:" . avy-goto-char)
+ ("M-g f" . avy-goto-line)))
+
+(use-package flycheck
+ :config
+ (add-hook 'after-init-hook #'global-flycheck-mode))
+
+(use-package flycheck-eglot
+ :after (flycheck eglot)
+ :config
+ (global-flycheck-eglot-mode +1))
(use-package ligature
- :ensure t
:config
(ligature-set-ligatures 'prog-mode ligatures-berkeley-mono)
- (global-ligature-mode t))
+ (global-ligature-mode +1))
(use-package magit
- :ensure t)
+ :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 meow
- :ensure t
+(use-package undo-tree
+ :custom
+ (undo-tree-auto-save-history nil)
:config
- (meow-setup-qwerty)
- (meow-global-mode 1))
+ (global-undo-tree-mode +1))
(use-package which-key
- :ensure t
:config
- (which-key-mode))
+ (which-key-mode +1))
+;;;
;;; OCaml
-(use-package tuareg
- :ensure t)
+;;;
+
+(use-package tuareg)
+
(use-package ocaml-eglot
- :ensure t
- :after tuareg
+ :after (flycheck tuareg)
+ :custom
+ (ocaml-eglot-syntax-checker 'flycheck)
:hook
(tuareg-mode . ocaml-eglot)
(ocaml-eglot . eglot-ensure))
-;;; TODO(nlordell):
-;;; 1. Update remaining init scripts:
-;;; (load "~/.config/emacs/gtd.el" nil t)
-;;; 2. 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>
-
-;;; Make the shell environement available when started on macOS Spotlight.
+;;;
+;;; macOS
+;;;
+
+;; Make the shell environement available when started on macOS Spotlight.
(when (memq window-system '(mac ns))
(use-package exec-path-from-shell
:config