From 1d384cb910741f09f967b4591db9993bcf83421d Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Tue, 8 Nov 2022 17:53:07 +0000 Subject: [PATCH] chore: folder restructure --- init.el | 5 ++++- lisp/editor.el | 15 ++++++++++++-- lisp/interface.el | 3 --- lisp/{org.el => org-mode.el} | 14 ++++++------- lisp/packages.el | 40 ++++++++++++++---------------------- 5 files changed, 39 insertions(+), 38 deletions(-) rename lisp/{org.el => org-mode.el} (95%) diff --git a/init.el b/init.el index d5506fe..0beea96 100644 --- a/init.el +++ b/init.el @@ -3,6 +3,9 @@ (tool-bar-mode -1) (scroll-bar-mode -1) +;; Disable the modeline. Done in this file for the same reason above +(setq-default mode-line-format nil) + ;; Straight.el bootstrap (defvar bootstrap-version) (let ((bootstrap-file @@ -29,5 +32,5 @@ (require 'interface) (require 'packages) +(require 'org-mode) (require 'editor) -(require 'org) diff --git a/lisp/editor.el b/lisp/editor.el index 3ccacdf..2d6e4e3 100644 --- a/lisp/editor.el +++ b/lisp/editor.el @@ -1,8 +1,19 @@ ;;; This file customizes Emacs' editor -;; evil - A Vi Layer inside of Emacs -(evil-mode 1) ; Enable evil +;;; evil - A Vi Layer inside of Emacs (setq evil-undo-system 'undo-fu) ; Enable undo/redo functionality using undo-fu +(evil-collection-init) ; Enable the evil-collection keybinds +(evil-mode 1) ; Enable evil + +;;; Themes +;; Customize doom-themes +(setq doom-themes-enable-bold t + doom-themes-enable-italic t) +(doom-themes-treemacs-config) ; Enable theming of treemacs +(doom-themes-org-config) ; And org-mode + +;; Set theme to doom-tokyo-night, Dianicemacs' default +(load-theme 'doom-tokyo-night t) ;; Provide this file to init.el (provide 'editor) diff --git a/lisp/interface.el b/lisp/interface.el index 1e343d9..50a58d2 100644 --- a/lisp/interface.el +++ b/lisp/interface.el @@ -3,9 +3,6 @@ ;; Stop Emacs from resizing the window at startup (setq frame-resize-pixelwise t) -;; Disable the modeline -(setq-default mode-line-format nil) - ;; Remove the startup screen (setq inhibit-startup-message t) diff --git a/lisp/org.el b/lisp/org-mode.el similarity index 95% rename from lisp/org.el rename to lisp/org-mode.el index a533bb0..3fd57f9 100644 --- a/lisp/org.el +++ b/lisp/org-mode.el @@ -1,11 +1,5 @@ ;;; This file contains configuration for Emacs' org-mode -;; Enable org-superstar-mode in org-mode files -(add-hook 'org-mode-hook (lambda() (org-superstar-mode 1))) - -;; Scale up latex elements -(plist-put org-format-latex-options :scale 1.75) - ;; Customize org-mode's default functionality (setq org-ellipsis "..." org-use-property-inheritance t @@ -37,5 +31,11 @@ :foreground 'unspecified :inherit 'org-level-8) +;; Scale up latex elements +(plist-put org-format-latex-options :scale 1.75) + +;; Enable org-superstar-mode in org-mode files +(add-hook 'org-mode-hook 'org-superstar-mode) + ;; Provide this file to init.el -(provide 'org) +(provide 'org-mode) diff --git a/lisp/packages.el b/lisp/packages.el index 005771e..bd84df9 100644 --- a/lisp/packages.el +++ b/lisp/packages.el @@ -1,47 +1,37 @@ ;;; This file contains the packages that Dianciemacs uses ;; magit - A beautiful git porcelain for Emacs -(use-package magit - :ensure t) +(use-package magit) ;;; Themes ;; Install the Doom Emacs theme megapack. -(use-package doom-themes - :ensure t - :config - (setq doom-themes-enable-bold t - doom-themes-enable-italic t) - (doom-themes-treemacs-config) - (doom-themes-org-config)) - +(use-package doom-themes) + ;; kaolin-themes, depends on autothemer (use-package kaolin-themes - :requires autothemer - :ensure t) + :requires autothemer) -(use-package autothemer - :ensure t) +(use-package autothemer) ;; all-the-icons - Icons for various UI elements -(use-package all-the-icons - :ensure t) +(use-package all-the-icons) ;;; org-mode ;; org-superstar -(use-package org-superstar - :ensure t) +(use-package org-superstar) ;;; evil - A Vi layer inside of Emacs (use-package evil - :requires undo-fu - :ensure t) + :config + (setq evil-want-keybinding nil ; Make room for evil-collection + evil-want-integration t) ; Same as above + :requires (undo-fu evil-collection)) + +;; A collection of keybinds for evil-mode +(use-package evil-collection) ;; undo-fu, used by evil for undo/redo functionality -(use-package undo-fu - :ensure t) - -;; Set theme to doom-tokyo-night, Dianicemacs' default -(load-theme 'doom-tokyo-night t) +(use-package undo-fu) ;; Provide this file to init.el (provide 'packages)