From b75c6b520f686fc6ac5a5dd8abe3e41bddc0f7ea Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Mon, 26 Jun 2023 18:12:37 +0100 Subject: [PATCH] chore: updates --- init.el | 9 +++++++++ lisp/editor.el | 9 +++++++++ lisp/org-mode.el | 32 +++++++++++++++++++------------- 3 files changed, 37 insertions(+), 13 deletions(-) diff --git a/init.el b/init.el index c379061..bd7e0bd 100644 --- a/init.el +++ b/init.el @@ -10,6 +10,12 @@ ;; Increase the threshold - performance (setq gc-cons-threshold (* 50 1000 1000)) +;; Set the font +(add-to-list 'default-frame-alist + '(font . "Iosevka SS12-11")) +(set-face-attribute 'default nil :family "Iosevka") +(set-face-attribute 'variable-pitch nil :family "Iosevka") + ;; Disable Emacs' GTK decorations. Done in this file otherwise done too late. (tool-bar-mode -1) (scroll-bar-mode -1) @@ -20,6 +26,9 @@ ;; Define the leader-key to use. (defconst leader-key "SPC") +;; Emacs 30 with straight.el +(setq straight-repository-branch "develop") + ;; Straight.el bootstrap (defvar bootstrap-version) (let ((bootstrap-file diff --git a/lisp/editor.el b/lisp/editor.el index 1a5af91..6455339 100644 --- a/lisp/editor.el +++ b/lisp/editor.el @@ -13,6 +13,15 @@ ; Line Wrapping (global-visual-line-mode 1) ; Prevent wrapping of words +;; yasnippet - A template system for Emacs +(use-package yasnippet + :config + (yas-reload-all) + (yas-global-mode)) +;; yasnippet-snippets - A snippet collection package by AndreaCotti +(use-package yasnippet-snippets + :after yasnippet) + ;; evil - A Vi Layer inside of Emacs (use-package evil :custom diff --git a/lisp/org-mode.el b/lisp/org-mode.el index 90f2c9d..b9c7bc9 100644 --- a/lisp/org-mode.el +++ b/lisp/org-mode.el @@ -16,20 +16,26 @@ '("🞉" "🞈" "🞇" "🞆" "🞅" "🞄")) :hook org-mode) -(with-eval-after-load 'org-superstar +;; Prevent the usage of automatic <> delimiters in org mode (conflict with snippets) +(add-hook 'org-mode-hook (lambda () + (setq-local electric-pair-inhibit-predicate + `(lambda (c) + (if (char-equal c ?<) t (,electric-pair-inhibit-predicate c)))))) + +(with-eval-after-load 'org ;; Faces for the font sizes of org-mode headings - (set-face-attribute 'org-level-8 nil :weight 'bold :inherit 'default) - (set-face-attribute 'org-level-7 nil :inherit 'org-level-8) - (set-face-attribute 'org-level-6 nil :inherit 'org-level-8) - (set-face-attribute 'org-level-5 nil :inherit 'org-level-8) - (set-face-attribute 'org-level-4 nil :inherit 'org-level-8) - (set-face-attribute 'org-level-3 nil :inherit 'org-level-8 :height 1.15) - (set-face-attribute 'org-level-2 nil :inherit 'org-level-8 :height 1.35) - (set-face-attribute 'org-level-1 nil :inherit 'org-level-8 :height 1.65) + (set-face-attribute 'org-level-8 nil :weight 'bold) + (set-face-attribute 'org-level-7 nil :weight 'bold) + (set-face-attribute 'org-level-6 nil :weight 'bold) + (set-face-attribute 'org-level-5 nil :weight 'bold :height 1.1) + (set-face-attribute 'org-level-4 nil :weight 'bold :height 1.2) + (set-face-attribute 'org-level-3 nil :weight 'bold :height 1.3) + (set-face-attribute 'org-level-2 nil :weight 'bold :height 1.4) + (set-face-attribute 'org-level-1 nil :weight 'bold :height 1.5) (set-face-attribute 'org-document-title nil - :height 1.85 + :height 1.65 :foreground 'unspecified - :inherit 'org-level-8)) + :weight 'bold)) (with-eval-after-load 'org ;; Customize org-mode's default functionality @@ -43,8 +49,8 @@ org-image-actual-width '(300) org-pretty-entities t org-adapt-indentation t) - - (plist-put org-format-latex-options :scale 2.5) ; Scale up latex elements + + ;; (plist-put org-format-latex-options :scale 2.5) ; Scale up latex elements (HiDPI) (setq org-directory "~/Org/") ; Set the folder used by org-mode (setq org-agenda-files (quote ("~/Org/"))) (setq org-roam-directory "~/Org/Roam/")) ; Set the folder used by org-roam