From 2016545923903cd41a08e98699fdf40b2f220712 Mon Sep 17 00:00:00 2001 From: Mitch Taylor Date: Mon, 23 Mar 2026 22:06:16 -0300 Subject: update emacs config to include additional modes and ibm plex fonts. remove useless abbrevs --- files/emacs/.emacs.d/post-init.el | 61 +++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 25 deletions(-) (limited to 'files/emacs/.emacs.d') diff --git a/files/emacs/.emacs.d/post-init.el b/files/emacs/.emacs.d/post-init.el index edb6dad..91be74d 100644 --- a/files/emacs/.emacs.d/post-init.el +++ b/files/emacs/.emacs.d/post-init.el @@ -1,6 +1,26 @@ ;;; post-init.el --- User Init -*- lexical-binding: t; -*- (load-theme 'modus-vivendi) +;; Set default font to IBM Plex Mono +(set-face-attribute 'default nil + :family "IBM Plex Mono" + :height 100) + +;; Variable-pitch font for proportional text +(set-face-attribute 'variable-pitch nil + :family "IBM Plex Sans" + :height 1.1) ; Slightly larger than fixed-pitch; relative scaling + +;; Fixed-pitch fallback ensures code blocks stay monospace +(set-face-attribute 'fixed-pitch nil + :family "IBM Plex Mono") + +(add-to-list 'default-frame-alist + '(font . "IBM Plex Mono-10")) + +(add-hook 'org-mode-hook #'variable-pitch-mode) +(add-hook 'markdown-mode-hook #'variable-pitch-mode) + (repeat-mode 1) (setq auth-sources '(password-store "~/.authinfo.gpg")) @@ -62,30 +82,6 @@ If ###@### is found, remove it and place point there at the end." ("ocb" "#+BEGIN_SRC @\n\n#+END_SRC" (lambda () (search-backward "@") (delete-char 1))) ("oheader" "#+TITLE: ###1###\n#+AUTHOR: ###2###\n#+EMAIL: ###3###\n#+OPTIONS: toc:nil\n" - emacs-solo/abbrev--replace-placeholders) - - ;; JS/TS snippets - ("imp" "import { ###1### } from '###2###';" - emacs-solo/abbrev--replace-placeholders) - ("fn" "function ###1### () {\n ###@### ;\n};" - emacs-solo/abbrev--replace-placeholders) - ("clog" "console.log(\">>> LOG:\", { ###@### })" - emacs-solo/abbrev--replace-placeholders) - ("cwarn" "console.warn(\">>> WARN:\", { ###@### })" - emacs-solo/abbrev--replace-placeholders) - ("cerr" "console.error(\">>> ERR:\", { ###@### })" - emacs-solo/abbrev--replace-placeholders) - ("afn" "async function() {\n \n}" - (lambda () (search-backward "}") (forward-line -1) (end-of-line))) - ("ife" "(function() {\n \n})();" - (lambda () (search-backward ")();") (forward-line -1) (end-of-line))) - ("esdeps" "// eslint-disable-next-line react-hooks/exhaustive-deps" - (lambda () (search-backward ")();") (forward-line -1) (end-of-line))) - ("eshooks" "// eslint-disable-next-line react-hooks/rules-of-hooks" - (lambda () (search-backward ")();") (forward-line -1) (end-of-line))) - - ;; React/JSX - ("rfc" "const ###1### = () => {\n return (\n
###2###
\n );\n};" emacs-solo/abbrev--replace-placeholders)))) (setopt tab-always-indent 'complete @@ -131,7 +127,7 @@ If ###@### is found, remove it and place point there at the end." (setq load-prefer-newer t) (use-package compile-angel - :demand t + :ensure nil :config (setq compile-angel-verbose nil) (push "/init.el" compile-angel-excluded-files) @@ -175,6 +171,21 @@ If ###@### is found, remove it and place point there at the end." :init (setq enwc-default-backend 'nm)) +(use-package nix-mode + :ensure nil + :mode "\\.nix\\'") + +(use-package markdown-mode + :ensure nil + :mode "\\.md\\'" + :init (setq markdown-command "lowdown") + :bind (:map markdown-mode-map + ("C-c C-e" . markdown-do))) + +(use-package yaml-mode + :ensure nil + :mode "\\.yml\\'") + (load-file (expand-file-name "gnus.el" user-emacs-directory)) (load-file (expand-file-name "eshell.el" user-emacs-directory)) -- cgit v1.2.3