diff options
| -rw-r--r-- | config/emacs/early-init.el | 5 | ||||
| -rw-r--r-- | config/emacs/init.el | 38 | ||||
| -rw-r--r-- | config/emacs/ligatures.el | 53 | ||||
| -rw-r--r-- | config/emacs/meow.el | 2 | ||||
| -rw-r--r-- | config/emacs/sanemacs.el | 9 |
5 files changed, 58 insertions, 49 deletions
diff --git a/config/emacs/early-init.el b/config/emacs/early-init.el index 124f57b..9e6be8e 100644 --- a/config/emacs/early-init.el +++ b/config/emacs/early-init.el @@ -15,8 +15,3 @@ ;;; Suppress native-comp warnings on startup (setq warning-suppress-log-types '((comp) (bytecomp))) - -;;; HACK: Work around native compilation errors on macOS + Macports... -(if (eq system-type 'darwin) - (setenv "LIBRARY_PATH" "/opt/local/lib/gcc12/gcc/arm64-apple-darwin23/12.3.0") -) diff --git a/config/emacs/init.el b/config/emacs/init.el index 9b7bd47..d39a80b 100644 --- a/config/emacs/init.el +++ b/config/emacs/init.el @@ -1,7 +1,12 @@ (load "~/.config/emacs/sanemacs.el" nil t) +(load "~/.config/emacs/ligatures.el" nil t) (load "~/.config/emacs/meow.el" nil t) -;;(load "~/.config/emacs/gtd.el" nil t) -;;(load "~/.config/emacs/ligatures.el" nil t) + +(use-package ligature + :ensure t + :config + (ligature-set-ligatures 'prog-mode ligatures-berkeley-mono) + (global-ligature-mode t)) (use-package magit :ensure t) @@ -9,7 +14,7 @@ (use-package meow :ensure t :config - (meow-setup) + (meow-setup-qwerty) (meow-global-mode 1)) (use-package which-key @@ -17,15 +22,26 @@ :config (which-key-mode)) +;;; OCaml +(use-package tuareg + :ensure t) +(use-package ocaml-eglot + :ensure t + :after tuareg + :hook + (tuareg-mode . ocaml-eglot) + (ocaml-eglot . eglot-ensure)) + ;;; TODO(nlordell): -;;; 1. Use built-in tree-sitter support (v29) -;;; 2. Simplify GTD.el to match what I do in Journal.md -;;; 3. Emacs over devcontainers/docker with TRAMP +;;; 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/> -;;; 4. Investigate other potential sane Emacs defaults +;;; 3. Investigate other potential sane Emacs defaults ;;; <https://idiomdrottning.org/bad-emacs-defaults> -;;; 5. Matering Emacs <https://www.masteringemacs.org/> -;;; Enable ligatures on macOS -(if (fboundp 'mac-auto-operator-composition-mode) - (mac-auto-operator-composition-mode)) +;;; Make the shell environement available when started on macOS Spotlight. +(when (memq window-system '(mac ns)) + (use-package exec-path-from-shell + :config + (exec-path-from-shell-initialize))) diff --git a/config/emacs/ligatures.el b/config/emacs/ligatures.el index 83f6431..cf98861 100644 --- a/config/emacs/ligatures.el +++ b/config/emacs/ligatures.el @@ -1,29 +1,24 @@ -;; Ligature configuration for Berlekey Mono font. Requires `ligature.el` which is -;; not in the GNU ELPA packages archive. -(use-package ligature - :ensure t - :config - (ligature-set-ligatures - 'prog-mode - '(; Group A - ".." ".=" "..." "..<" "::" ":::" ":=" "::=" ";;" ";;;" "??" "???" ".?" "?." - ":?" "?:" "?=" "**" "***" "/*" "*/" "/**" - ; Group B - "<-" "->" "-<" ">-" "<--" "-->" "<<-" "->>" "-<<" ">>-" "<-<" ">->" "<-|" - "|->" "-|" "|-" "||-" "<!--" "<#--" "<=" "=>" ">=" "<==" "==>" "<<=" "=>>" - "=<<" ">>=" "<=<" ">=>" "<=|" "|=>" "<=>" "<==>" "||=" "|=" "//=" "/=" - ; Group C - "<<" ">>" "<<<" ">>>" "<>" "<$" "$>" "<$>" "<+" "+>" "<+>" "<:" ":<" "<:<" - ">:" ":>" "<~" "~>" "<~>" "<<~" "<~~" "~~>" "~~" "<|" "|>" "<|>" "<||" - "||>" "<|||" "|||>" "</" "/>" "</>" "<*" "*>" "<*>" ":?>" - ; Group D - "#(" "#{" "#[" "]#" "#!" "#?" "#=" "#_" "#_(" "##" "###" "####" - ; Group E - "[|" "|]" "[<" ">]" "{!!" "!!}" "{|" "|}" "{{" "}}" "{{--" "--}}" "{!--" - "//" "///" "!!" - ; Group F - "www" "@_" "&&" "&&&" "&=" "~@" "++" "+++" "/\\" "\\/" "_|_" "||" - ; Group G - "=:" "=:=" "=!=" "==" "===" "=/=" "=~" "~-" "^=" "__" "!=" "!==" "-~" "--" - "---")) - (global-ligature-mode t)) +(defvar + ligatures-berkeley-mono + '(; Group A + ".." ".=" "..." "..<" "::" ":::" ":=" "::=" ";;" ";;;" "??" "???" ".?" "?." + ":?" "?:" "?=" "**" "***" "/*" "*/" "/**" + ; Group B + "<-" "->" "-<" ">-" "<--" "-->" "<<-" "->>" "-<<" ">>-" "<-<" ">->" "<-|" + "|->" "-|" "|-" "||-" "<!--" "<#--" "<=" "=>" ">=" "<==" "==>" "<<=" "=>>" + "=<<" ">>=" "<=<" ">=>" "<=|" "|=>" "<=>" "<==>" "||=" "|=" "//=" "/=" + ; Group C + "<<" ">>" "<<<" ">>>" "<>" "<$" "$>" "<$>" "<+" "+>" "<+>" "<:" ":<" "<:<" + ">:" ":>" "<~" "~>" "<~>" "<<~" "<~~" "~~>" "~~" "<|" "|>" "<|>" "<||" + "||>" "<|||" "|||>" "</" "/>" "</>" "<*" "*>" "<*>" ":?>" + ; Group D + "#(" "#{" "#[" "]#" "#!" "#?" "#=" "#_" "#_(" "##" "###" "####" + ; Group E + "[|" "|]" "[<" ">]" "{!!" "!!}" "{|" "|}" "{{" "}}" "{{--" "--}}" "{!--" + "//" "///" "!!" + ; Group F + "www" "@_" "&&" "&&&" "&=" "~@" "++" "+++" "/\\" "\\/" "_|_" "||" + ; Group G + "=:" "=:=" "=!=" "==" "===" "=/=" "=~" "~-" "^=" "__" "!=" "!==" "-~" "--" + "---") + "Ligatures for the Berkeley Mono font.") diff --git a/config/emacs/meow.el b/config/emacs/meow.el index 1235ea2..fcdb610 100644 --- a/config/emacs/meow.el +++ b/config/emacs/meow.el @@ -1,4 +1,4 @@ -(defun meow-setup () +(defun meow-setup-qwerty () "Default QWERTY Meow setup." (setq meow-cheatsheet-layout meow-cheatsheet-layout-qwerty) (meow-motion-overwrite-define-key diff --git a/config/emacs/sanemacs.el b/config/emacs/sanemacs.el index ad478d5..323986d 100644 --- a/config/emacs/sanemacs.el +++ b/config/emacs/sanemacs.el @@ -7,6 +7,7 @@ (if (fboundp 'tool-bar-mode) (tool-bar-mode -1)) (if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1)) (column-number-mode) +(add-hook 'prog-mode-hook #'display-line-numbers-mode) (fset 'yes-or-no-p 'y-or-n-p) (setq inhibit-startup-screen t @@ -17,6 +18,7 @@ cursor-type 'bar show-trailing-whitespace t tab-width 4) +(load-theme 'modus-vivendi) ;;; Write auto-saves, backups and bookmarks to `.cache` directory (setq @@ -31,11 +33,12 @@ (with-eval-after-load 'tramp-cache (setq tramp-persistency-file-name "~/.cache/emacs/tramp")) -;;; Setup Modus theme -(load-theme 'modus-vivendi) - ;;; Use separate file for custom variables (setq custom-file "~/.cache/emacs/custom.el") (unless (file-exists-p custom-file) (write-region "" nil custom-file)) (load custom-file nil t) + +;;; Include MELPA packages +(require 'package) +(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) |
