From d23eb06cb31822cfc4bf5d5c77704b7dfaa0bf81 Mon Sep 17 00:00:00 2001 From: JaeYoo-Im Date: Wed, 11 Jan 2023 00:10:06 +0900 Subject: [PATCH] remove backup file --- .config/emacs/config.el | 23 +- .config/emacs/init.el | 7 +- .config/emacs/logo.png | Bin 0 -> 12844 bytes .config/emacs/logo.svg | 405 +++++++++++++++++++++ .config/emacs/modules/#crafted-ui.el# | 198 ---------- .config/emacs/modules/crafted-defaults.el~ | 120 ------ .config/emacs/modules/crafted-editing.el | 98 +++++ .config/emacs/modules/crafted-latex.el | 135 +++++++ .config/emacs/modules/crafted-org.el | 34 ++ .config/emacs/modules/crafted-project.el | 17 + .config/emacs/modules/custom-dashboard.el | 9 +- .config/emacs/modules/custom-evil.el~ | 109 ------ .config/emacs/modules/custom-org.el | 22 ++ 13 files changed, 733 insertions(+), 444 deletions(-) create mode 100755 .config/emacs/logo.png create mode 100755 .config/emacs/logo.svg delete mode 100644 .config/emacs/modules/#crafted-ui.el# delete mode 100644 .config/emacs/modules/crafted-defaults.el~ create mode 100644 .config/emacs/modules/crafted-editing.el create mode 100644 .config/emacs/modules/crafted-latex.el create mode 100644 .config/emacs/modules/crafted-org.el create mode 100644 .config/emacs/modules/crafted-project.el delete mode 100644 .config/emacs/modules/custom-evil.el~ create mode 100644 .config/emacs/modules/custom-org.el diff --git a/.config/emacs/config.el b/.config/emacs/config.el index 8a91ffc..a89d303 100644 --- a/.config/emacs/config.el +++ b/.config/emacs/config.el @@ -1,10 +1,14 @@ -(require 'crafted-defaults) ; Sensible Default settings for Emacs -(require 'crafted-updates) ; Tools to upgrade Crafted Emacs -(require 'crafted-completion) ; selection framework based on 'vertico' -(require 'crafted-ui) ; Better UI experience (modeline etc..) -;;(require 'crafted-windows) ; Window management configuration -(require 'crafted-evil) ; An 'evil-mode' configuration -;;(require 'custom-evil) ; An 'evil-mode' configuration +(require 'crafted-defaults) ; Sensible Default settings for Emacs +(require 'crafted-updates) ; Tools to upgrade Crafted Emacs +(require 'crafted-completion) ; selection framework based on 'vertico' +(require 'crafted-ui) ; Better UI experience (modeline etc..) +(require 'crafted-evil) ; An 'evil-mode' configuration +;;(require 'custom-evil) ; An 'evil-mode' configuration +(require 'crafted-editing) ; Whitespace trimming, auto parens etc. +;;(require 'crafted-org) ; org-appear, clickable hyperlinks etc. +(require 'custom-org) ; org-appear, clickable hyperlinks etc. +(require 'crafted-project) +(require 'crafted-latex) (setq-default tab-width 4) (defvaralias 'c-basic-offset 'tab-width) @@ -29,12 +33,11 @@ (add-hook 'emacs-startup-hook (lambda () (custom-set-faces - `(default ((t (:font "Fira Code 10")))) + `(default ((t (:font "Fira Code 12")))) `(fixed-pitch ((t (:inherit (default))))) `(fixed-pitch-serif ((t (:inherit (default))))) - `(variable-pitch ((t (:font "Ubuntu 10"))))))) + `(variable-pitch ((t (:font "Ubuntu Mono 12"))))))) (set-fontset-font t `hangul (font-spec :name "NanumGothic")) - ;; loading themes (crafted-package-install-package 'doom-themes) (progn diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 4673010..4baf3e6 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -57,10 +57,13 @@ package.el or Guix depending on the value of ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - '(package-selected-packages '(doom-themes))) + '(package-selected-packages '(auctex doom-themes))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - ) + '(default ((t (:font "Fira Code 12")))) + '(fixed-pitch ((t (:inherit (default))))) + '(fixed-pitch-serif ((t (:inherit (default))))) + '(variable-pitch ((t (:font "Ubuntu Mono 12"))))) diff --git a/.config/emacs/logo.png b/.config/emacs/logo.png new file mode 100755 index 0000000000000000000000000000000000000000..47ad47df1b8c002083f26fdfc059775092ad3192 GIT binary patch literal 12844 zcmV+{GSkh8P)+!ny>^iIy%~(&GG;dS=B0L`}_O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ngI-W*xr5aVkfG>pf29})(u34*A;JVGfEXs_h z1^A-tc8oOslw1=zYk&dZ@;~^(3L&lg09q6DcNI!mI|D0c2OvwyaBEf6T?xw)aMf3@ z8G64uaJ7PAQGe{&x6dA^jIev9&QahC%K|fdD+btB_|eBe1$!&EyG{*`>)B@_GVO2F zK1bt8>REHVG8x+&l10ecYNhH;S86QBZ01*9vt#5)vxLoLNdN|bKYjO?&w(ZHW};qw z%`3p0%%06GJpZ#^7nk8T3{oOEj?;?$9TiM( zymrT@ViVXGD@zJ609^i_FRo|84*_h9g6zfh?vL8f0Hh1aO8s&On4eBp#ewss?`J3m z`Wbt#uUfVpK4}66BW(T$wprQWTD=xLOE$r6z}^JrF4RlbJ⪙0n^V0rr27_I1xdhMjN=QlYy&r$JrQwBvAzAyW-4Vf?@sZ7D zjr0IQ70iGuC90JwSgrII02_GA$-t(8ya?Ilu=VRV?)b#<#hlzoo)>@t;Eyl;Vz(rD zJAexVKuKp|3efCzCm_9-vMjai5(toz;jpWKqaaTJssSh)8th{*0Tu~layf*0A%wwo zC2G|gq;ySiTLjjKFG84UX9n4~U$f&crWch#6It{?M>Bcgi62(p@b*{SRG!K(GcICp zMbkh90tnS$>^FiLI+0(IlRduU2mu4UM38aTzyiQDfd6&#F-V)Y&Apu~V}!eBqn9=LWkU801(sKLG@25WH!Bb&(}lg&X&2h~b#;p`lLtyzhNiXJl#YcLejt7}!D)+ng#*sPTHRvzB@p6$%=~IBU}`Ub<_unXkpS%^!q;Zx)*U-`yu)pN z%Fj=J;Q-d7nafq%LFmXSw(&eva*{HFm}m-oE&|8-EVauE|Q z25=F8Z2;PvoVHMz1@J6`?`Gg9MaJD<*)dXD;%hwb@}CmmBzf;|j;wSoY$g($0l9^k z)-j>wsB&NgK&UBdzs~47xtd# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.config/emacs/modules/#crafted-ui.el# b/.config/emacs/modules/#crafted-ui.el# deleted file mode 100644 index 56eb196..0000000 --- a/.config/emacs/modules/#crafted-ui.el# +++ /dev/null @@ -1,198 +0,0 @@ -jjjjjjjjjjj;;; crafted-ui.el -*- lexical-binding: t; -*- - -;; Copyright (C) 2022 -;; SPDX-License-Identifier: MIT - -;; Author: System Crafters Community - -;; Commentary - -;; User interface customizations. Examples are the modeline and how -;; help buffers are displayed. - -;; This package provides a basic, customized appearance for -;; Emacs. Specifically, it uses: Helpful to customize the information -;; and visual display of help buffers, such as that created by M-x -;; `describe-function'; Doom Modeline and Themes, to customize the -;; appearance of buffers, text, et cetera; All-the-icons, to provide -;; Doom Modeline with font-based icons (rather than raster or vector -;; images); and includes some Emacs Lisp demonstrations. - -;;  Run `all-the-icons-install-fonts' to ensure the fonts necessary -;; for ALL THE ICONS are available on your system. You must run this -;; function if the "stop" icon at the beginning of this paragraph is -;; not displayed properly (it appears as a box with some numbers -;; and/or letters inside it). - -;; Read the documentation for `all-the-icons'; on Windows, -;; `all-the-icons-install-fonts' only downloads fonts, they must be -;; installed manually. This is necessary if icons are not displaying -;; properly. - -;;; Code: - -(crafted-package-install-package 'all-the-icons) -(crafted-package-install-package 'elisp-demos) -(crafted-package-install-package 'helpful) - -;;;; Font -(defun crafted-ui--set-default-font (spec) - "Set the default font based on SPEC. - -SPEC is expected to be a plist with the same key names -as accepted by `set-face-attribute'." - (when spec - (apply 'set-face-attribute 'default nil spec))) - -(defun crafted-ui--toggle-doom-modeline-mode (state) - "Turn on/off doom-modeline-mode if it is installed. - -STATE is either 1 to turn the mode on, or -1 to turn it off." - (when (package-installed-p 'doom-modeline) - (doom-modeline-mode state))) - -(defgroup crafted-ui '() - "User interface related configuration for Crafted Emacs." - :tag "Crafted UI" - :group 'crafted) - -(define-obsolete-variable-alias - 'rational-ui-default-font - 'crafted-ui-default-font - "1") -(defcustom crafted-ui-default-font nil - "The configuration of the `default' face. -Use a plist with the same key names as accepted by `set-face-attribute'." - :group 'crafted-ui - :type '(plist :key-type: symbol) - :tag "Default font" - :set (lambda (sym val) - (let ((prev-val (if (boundp 'crafted-ui-default-font) - crafted-ui-default-font - nil))) - (set-default sym val) - (when (and val (not (eq val prev-val))) - (crafted-ui--set-default-font val))))) - -;;;; Mode-Line -(defcustom crafted-ui-use-doom-modeline nil - "Use doom-modeline-mode." - :group 'crafted-ui - :type 'boolean - :tag "Use Doom Modeline" - :set (lambda (sym val) - (set-default sym val) - (if val - (crafted-ui--toggle-doom-modeline-mode 1) - (crafted-ui--toggle-doom-modeline-mode -1)))) - -;; Configure `doom-modeline' if it is enabled -(when crafted-ui-use-doom-modeline - (crafted-package-install-package 'doom-modeline) - (customize-set-variable 'doom-modeline-height 15) - (customize-set-variable 'doom-modeline-bar-width 6) - (customize-set-variable 'doom-modeline-minor-modes t) - (customize-set-variable 'doom-modeline-buffer-file-name-style 'truncate-except-project)) - -;;;; Help Buffers - -;; Make `describe-*' screens more helpful -(require 'helpful) -(define-key helpful-mode-map [remap revert-buffer] #'helpful-update) -(global-set-key [remap describe-command] #'helpful-command) -(global-set-key [remap describe-function] #'helpful-callable) -(global-set-key [remap describe-key] #'helpful-key) -(global-set-key [remap describe-symbol] #'helpful-symbol) -(global-set-key [remap describe-variable] #'helpful-variable) -(global-set-key (kbd "C-h F") #'helpful-function) - -;; Bind extra `describe-*' commands -(global-set-key (kbd "C-h K") #'describe-keymap) - -;;;; Line Numbers -(define-obsolete-variable-alias - 'rational-ui-line-numbers-enabled-modes - 'crafted-ui-line-numbers-enabled-modes - "1") -(defcustom crafted-ui-line-numbers-enabled-modes - '(conf-mode prog-mode) - "Modes which should display line numbers." - :type 'list - :group 'crafted-ui) - -(define-obsolete-variable-alias - 'rational-ui-line-numbers-disabled-modes - 'crafted-ui-line-numbers-disabled-modes - "1") -(defcustom crafted-ui-line-numbers-disabled-modes - '(org-mode) - "Modes which should not display line numbers. -Modes derived from the modes defined in -`crafted-ui-line-number-enabled-modes', but should not display line numbers." - :type 'list - :group 'crafted-ui) - -(defun crafted-ui--enable-line-numbers-mode () - "Turn on line numbers mode. - -Used as hook for modes which should display line numbers." - (display-line-numbers-mode 1)) - -(defun crafted-ui--disable-line-numbers-mode () - "Turn off line numbers mode. - -Used as hook for modes which should not display line numebrs." - (display-line-numbers-mode -1)) - -(defun crafted-ui--update-line-numbers-display () - "Update configuration for line numbers display." - (if crafted-ui-display-line-numbers - (progn - (dolist (mode crafted-ui-line-numbers-enabled-modes) - (add-hook (intern (format "%s-hook" mode)) - #'crafted-ui--enable-line-numbers-mode)) - (dolist (mode crafted-ui-line-numbers-disabled-modes) - (add-hook (intern (format "%s-hook" mode)) - #'crafted-ui--disable-line-numbers-mode)) - (setq-default - display-line-numbers-grow-only t - display-line-numbers-type t - display-line-numbers-width 2)) - (progn - (dolist (mode crafted-ui-line-numbers-enabled-modes) - (remove-hook (intern (format "%s-hook" mode)) - #'crafted-ui--enable-line-numbers-mode)) - (dolist (mode crafted-ui-line-numbers-disabled-modes) - (remove-hook (intern (format "%s-hook" mode)) - #'crafted-ui--disable-line-numbers-mode))))) - -(define-obsolete-variable-alias - 'rational-ui-display-line-numbers - 'crafted-ui-display-line-numbers - "1") -(defcustom crafted-ui-display-line-numbers nil - "Whether line numbers should be enabled." - :type 'boolean - :group 'crafted-ui - :set (lambda (sym val) - (set-default sym val) - (crafted-ui--update-line-numbers-display))) - -;;;; Elisp-Demos - -;; also add some examples -(require 'elisp-demos) -(advice-add 'helpful-update :after #'elisp-demos-advice-helpful-update) - -;; add visual pulse when changing focus, like beacon but built-in -;; from from https://karthinks.com/software/batteries-included-with-emacs/ -(defun pulse-line (&rest _) - "Pulse the current line." - (pulse-momentary-highlight-one-line (point))) - -(dolist (command '(scroll-up-command scroll-down-command - recenter-top-bottom other-window)) - (advice-add command :after #'pulse-line)) - -(provide 'crafted-ui) -;;; crafted-ui.el ends here diff --git a/.config/emacs/modules/crafted-defaults.el~ b/.config/emacs/modules/crafted-defaults.el~ deleted file mode 100644 index 03bf913..0000000 --- a/.config/emacs/modules/crafted-defaults.el~ +++ /dev/null @@ -1,120 +0,0 @@ -;;; crafted-defaults.el -*- lexical-binding: t; -*- - -;; Revert Dired and other buffers -(customize-set-variable 'global-auto-revert-non-file-buffers t) -;; Revert buffers when the underlying file has changed -(global-auto-revert-mode 1) -(setq global-auto-revert-non-file-buffers t) ;; TODO check -;; Line numbers -(global-display-line-numbers-mode 1) -(setq display-line-numbers-type `relative) - -;; Typed text replaces the selection if the selection is active, -;; pressing delete or backspace deletes the selection. -(delete-selection-mode) -;; Use spaces instead of tabs // TODO Check!! -(setq-default indent-tabs-mode nil) - -;; Use "y" and "n" to confirm/negate prompt instead of "yes" and "no" -;; Using `advice' here to make it easy to reverse in custom -;; configurations with `(advice-remove 'yes-or-no-p #'y-or-n-p)' -;; -;; N.B. Emacs 28 has a variable for using short answers, which should -;; be preferred if using that version or higher. -(if (boundp 'use-short-answers) - (setq use-short-answers t) - (advice-add 'yes-or-no-p :override #'y-or-n-p)) - -;; Turn on recentf mode -(add-hook 'after-init-hook #'recentf-mode) -(customize-set-variable 'recentf-save-file - (expand-file-name "recentf" crafted-config-var-directory)) - -;; Do not save duplicates in kill-ring -(customize-set-variable 'kill-do-not-save-duplicates t) - - -;; Make scrolling less stuttered // TODO emacs29 scroll check!! -;;(setq auto-window-vscroll nil) -;;(customize-set-variable 'fast-but-imprecise-scrolling t) -;;(customize-set-variable 'scroll-conservatively 101) -;;(customize-set-variable 'scroll-margin 0) -;;(customize-set-variable 'scroll-preserve-screen-position t) - -;; Better support for files with long lines -(setq-default bidi-paragraph-direction 'left-to-right) -(setq-default bidi-inhibit-bpa t) -(global-so-long-mode 1) - -;; Make shebang (#!) file executable when saved -(add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p) - -;; Enable savehist-mode for command history -(savehist-mode 1) - -;; Keep state files in `crafted-config-var-directory' by default -;; we use `with-eval-after-load' to only affect what is being used. -;; -;; Note that this can introduce issues depending on how each module -;; works. Like, for example, if the module reads those files during -;; load it may happen that it reads the file on its default location -;; before the path is changed (because this code runs after-load, -;; and user customization is run after all of crafted-emacs is loaded) -;; -;; So, each variable needs some thought on how/when to set it, -;; while also trying to not set variables for modules the user -;; is not loading / using. - -;; Enable the sensible path defaults -(defcustom crafted-folders t - "Non-nil enabled 'sensible folder layout' behaviour." - :type 'boolean - :group 'crafted) - -(defun crafted-defaults--sensible-path - (root varname name) - "Sets the VARNAME to a path named NAME inside ROOT. - But only if `crafted-folders' is enabled (`t'). - - For example (crafted-config-var-directory 'savehist-file \"history\") - Will set `savehist-file' to, ie, ~/.config/crafted-emacs/var/history" - (if-let ((path (expand-file-name name root)) - (crafted-folders)) - (customize-set-variable varname path) - )) - -(crafted-defaults--sensible-path crafted-config-var-directory - 'savehist-file "history") - -(crafted-defaults--sensible-path crafted-config-var-directory - 'auto-save-list-file-prefix "auto-save-list/.saves-") - -(with-eval-after-load 'saveplace - (crafted-defaults--sensible-path crafted-config-var-directory - 'save-place-file "places")) - -(with-eval-after-load 'bookmark - (crafted-defaults--sensible-path crafted-config-var-directory - 'bookmark-default-file "bookmarks")) - -(with-eval-after-load 'tramp - (crafted-defaults--sensible-path crafted-config-var-directory - 'tramp-persistency-file-name - "tramp")) - -(with-eval-after-load 'org-id - (crafted-defaults--sensible-path crafted-config-var-directory - 'org-id-locations-file - "org-id-locations")) - -(with-eval-after-load 'nsm - (crafted-defaults--sensible-path crafted-config-var-directory - 'nsm-settings-file - "network-security.data")) - -(with-eval-after-load 'project - (crafted-defaults--sensible-path crafted-config-var-directory - 'project-list-file - "projects")) - -(provide 'crafted-defaults) diff --git a/.config/emacs/modules/crafted-editing.el b/.config/emacs/modules/crafted-editing.el new file mode 100644 index 0000000..012672c --- /dev/null +++ b/.config/emacs/modules/crafted-editing.el @@ -0,0 +1,98 @@ +;;; crafted-editing.el -*- lexical-binding: t; -*- + +;; Copyright (C) 2022 +;; SPDX-License-Identifier: MIT + +;; Author: System Crafters Community + +;; Commentary + +;; Editing text configuration. + +;;; Code: + +;;; Helpers for defcustom variables + +(defun crafted-editing--prefer-tabs (enable) + "Adjust whitespace configuration to support tabs based on ENABLE." + (if enable + (customize-set-variable 'whitespace-style + '(face empty trailing indentation::tab + space-after-tab::tab + space-before-tab::tab)) + (customize-set-variable 'whitespace-style + '(face empty trailing tab-mark + indentation::space)))) + +(defun crafted-editing--enable-whitespace-modes (modes) + "Enable whitespace-mode for each mode specified by MODES." + (dolist (mode modes) + (add-hook (intern (format "%s-hook" mode)) + #'whitespace-mode))) + +(defun crafted-editing--disable-whitespace-modes (modes) + "Do not enable whitespace-mode for each mode specified by MODES." + (dolist (mode modes) + (remove-hook (intern (format "%s-hook" mode)) + #'whitespace-mode))) + +;;; Customization group for the Crafted Editing module. +(defgroup crafted-editing '() + "Editing related configuration for Crafted Emacs." + :tag "Crafted Editing" + :group 'crafted) + +(define-obsolete-variable-alias + 'rational-editing-prefer-tabs + 'crafted-editing-prefer-tabs + "1") + +;; provide an option for users who prefer tabs over spaces +(defcustom crafted-editing-prefer-tabs nil + "Prefer using tabs instead of spaces." + :tag "Prefer tabs over spaces" + :group 'crafted-editing + :set (lambda (sym val) + (set-default sym val) + (crafted-editing--prefer-tabs val))) + +(define-obsolete-variable-alias + 'rational-editing-whitespace-cleanup-enabled-modes + 'crafted-editing-whitespace-cleanup-enabled-modes + "1") + +;; whitespace cleanup configuration +(defcustom crafted-editing-whitespace-cleanup-enabled-modes + '(conf-mode prog-mode) + "Modes which should have whitespace cleanup enabled." + :type 'list + :tag "Whitespace cleanup enabled modes" + :group 'crafted-editing + :set (lambda (sym val) + (set-default sym val) + (crafted-editing--enable-whitespace-modes val))) + +(define-obsolete-variable-alias + 'rational-editing-whitespace-cleanup-disabled-modes + 'crafted-editing-whitespace-cleanup-disabled-modes + "1") + +(defcustom crafted-editing-whitespace-cleanup-disabled-modes + '(makefile-mode) + "Modes which should not have whitespace cleanup enabled." + :type 'list + :tag "Whitespace cleanup disabled modes" + :group 'crafted-editing + :set (lambda (sym val) + (set-default sym val) + (crafted-editing--disable-whitespace-modes val))) + +;;; cleanup whitespace +(customize-set-variable 'whitespace-action '(cleanup auto-cleanup)) + +;;; parentheses +(electric-pair-mode 1) ; auto-insert matching bracket +(show-paren-mode 1) ; turn on paren match highlighting + +(provide 'crafted-editing) +;;; crafted-editing.el ends here diff --git a/.config/emacs/modules/crafted-latex.el b/.config/emacs/modules/crafted-latex.el new file mode 100644 index 0000000..9f0ba04 --- /dev/null +++ b/.config/emacs/modules/crafted-latex.el @@ -0,0 +1,135 @@ +;;; crafted-latex.el -*- lexical-binding: t; -*- + +;; Copyright (C) 2022 +;; SPDX-License-Identifier: MIT + +;; Author: System Crafters Community + +;; Commentary + +;; Configure AUCTEX for editing LaTeX files. Provides customization +;; for various environments to provide some useful additions related +;; to drawing graphs and mathematical diagrams, and code listings. + +;;; Code: + +(defgroup crafted-latex '() + "LaTeX configuration for Crafted Emacs." + :tag "Crafted LaTeX" + :group 'crafted) + +(defcustom crafted-latex-latexp (executable-find "latex") + "Fully qualified path to the `latex' executable" + :tag "`latex' executable location" + :group 'crafted-latex + :type 'string) + +(defcustom crafted-latex-latexmkp (executable-find "latexmk") + "Fully qualified path to the `latexmk' executable" + :tag "`latexmk' executable location" + :group 'crafted-latex + :type 'string) + +(defcustom crafted-latex-use-pdf-tools nil + "Use pdf-tools as the pdf reader + (this is automatic if you load `crafted-pdf-reader')" + :tag "Use pdf-tools as pdf reader" + :group 'crafted-latex + :type 'boolean) + +(defcustom crafted-latex-inhibit-latexmk t + "When set to `nil', the package auctex-latexmk gets installed if the +latex and latexmk executable are found +This package contains a bug which might make it crash during loading +(with a bug related to tex-buf) on newer systems. For this reason, we inhibit +the installation of this package by default. +If you encounter the bug, you keep this package inhibited. You can install +a fix (not on melpa) with the following recipe, and the configuration in this file +will still work +'(auctex-latexmk :fetcher git :host github :repo \"wang1zhen/auctex-latexmk\")" + :tag "Inhibit using `latexmk' command from auxtex-latexmk" + :group 'crafted-latex + :type 'boolean) + + +;; only install and load auctex when the latex executable is found, +;; otherwise it crashes when loading + +(when crafted-latex-latexp + (crafted-package-install-package 'auctex) + + (with-eval-after-load 'latex + (customize-set-variable 'TeX-auto-save t) + (customize-set-variable 'TeX-parse-self t) + (setq-default TeX-master nil) + + ;; compile to pdf + (tex-pdf-mode) + + ;; correlate the source and the output + (TeX-source-correlate-mode) + + ;; set a correct indentation in a few additional environments + (add-to-list 'LaTeX-indent-environment-list '("lstlisting" current-indentation)) + (add-to-list 'LaTeX-indent-environment-list '("tikzcd" LaTeX-indent-tabular)) + (add-to-list 'LaTeX-indent-environment-list '("tikzpicture" current-indentation)) + + ;; add a few macros and environment as verbatim + (add-to-list 'LaTeX-verbatim-environments "lstlisting") + (add-to-list 'LaTeX-verbatim-environments "Verbatim") + (add-to-list 'LaTeX-verbatim-macros-with-braces "lstinline") + (add-to-list 'LaTeX-verbatim-macros-with-delims "lstinline") + + ;; to use pdfview with auctex + (when crafted-latex-use-pdf-tools + (customize-set-variable 'TeX-view-program-selection '((output-pdf "PDF Tools"))) + (customize-set-variable 'TeX-view-program-list '(("PDF Tools" TeX-pdf-tools-sync-view))) + (customize-set-variable 'TeX-source-correlate-start-server t)) + + ;; electric pairs in auctex + (customize-set-variable 'TeX-electric-sub-and-superscript t) + (customize-set-variable 'LaTeX-electric-left-right-brace t) + (customize-set-variable 'TeX-electric-math (cons "$" "$")) + + ;; open all buffers with the math mode and auto-fill mode + (add-hook 'LaTeX-mode-hook #'auto-fill-mode) + (add-hook 'LaTeX-mode-hook #'LaTeX-math-mode) + + ;; add support for references + (add-hook 'LaTeX-mode-hook 'turn-on-reftex) + (customize-set-variable 'reftex-plug-into-AUCTeX t) + + ;; to have the buffer refresh after compilation + (add-hook 'TeX-after-compilation-finished-functions #'TeX-revert-document-buffer))) + +;; message the user if the latex executable is not found +(add-hook 'tex-mode-hook + #'(lambda () (unless crafted-latex-latexp (message "latex executable not found")))) + +;; The following is to use auctex with latexmk. +(defun crafted-latex--install-latexmk () + "install the auctex-latexmk package when the latex and latexmk executable +are found (see `crafted-latex-inhibit-latexmk' )" + (when (and crafted-latex-latexp + crafted-latex-latexmkp) + (crafted-package-install-package 'auctex-latexmk))) + +(defun crafted-latex--watch-inhibit-latexmk (sym val op buf) + "watcher for the `crafted-latex-inhibit-latexmk' variable" + (unless val + (crafted-latex--install-latexmk))) + +(add-variable-watcher 'crafted-latex-inhibit-latexmk + #'crafted-latex--watch-inhibit-latexmk) + +(when (and crafted-latex-latexp + crafted-latex-latexmkp) + (with-eval-after-load 'latex + (when (require 'auctex-latexmk nil 'noerror) + (with-eval-after-load 'auctex-latexmk + (auctex-latexmk-setup) + (customize-set-variable 'auctex-latexmk-inherit-TeX-PDF-mode t)) + (add-hook 'TeX-mode-hook #'(lambda () (setq TeX-command-default "LatexMk")))))) + +(provide 'crafted-latex) +;;; crafted-latex.el ends here diff --git a/.config/emacs/modules/crafted-org.el b/.config/emacs/modules/crafted-org.el new file mode 100644 index 0000000..e17ac07 --- /dev/null +++ b/.config/emacs/modules/crafted-org.el @@ -0,0 +1,34 @@ +;;; crafted-org.el -*- lexical-binding: t; -*- + +;; Copyright (C) 2022 +;; SPDX-License-Identifier: MIT + +;; Author: System Crafters Community + +;; Commentary + +;; Provides basic configuration for Org Mode. + +;;; Code: + +(crafted-package-install-package 'org-appear) + +;; Return or left-click with mouse follows link +(customize-set-variable 'org-return-follows-link t) +(customize-set-variable 'org-mouse-1-follows-link t) + +;; Display links as the description provided +(customize-set-variable 'org-link-descriptive t) + +;; Hide markup markers +(customize-set-variable 'org-hide-emphasis-markers t) +(add-hook 'org-mode-hook 'org-appear-mode) + +;; disable auto-pairing of "<" in org-mode +(add-hook 'org-mode-hook (lambda () + (setq-local electric-pair-inhibit-predicate + `(lambda (c) + (if (char-equal c ?<) t (,electric-pair-inhibit-predicate c)))))) + +(provide 'crafted-org) +;;; crafted-org.el ends here diff --git a/.config/emacs/modules/crafted-project.el b/.config/emacs/modules/crafted-project.el new file mode 100644 index 0000000..c4c61dd --- /dev/null +++ b/.config/emacs/modules/crafted-project.el @@ -0,0 +1,17 @@ +;;;; crafted-project.el --- Starting configuration for project management -*- lexical-binding: t; -*- + +;; Copyright (C) 2022 +;; SPDX-License-Identifier: MIT + +;; Author: System Crafters Community + +;;; Commentary + +;; Provides default settings for project management with project.el + +;;; Code: + +(customize-set-variable 'project-list-file (expand-file-name "projects" crafted-config-var-directory)) + +(provide 'crafted-project) +;;; crafted-project.el ends here diff --git a/.config/emacs/modules/custom-dashboard.el b/.config/emacs/modules/custom-dashboard.el index 5cebdb3..fced8ec 100644 --- a/.config/emacs/modules/custom-dashboard.el +++ b/.config/emacs/modules/custom-dashboard.el @@ -2,15 +2,15 @@ (crafted-package-install-package 'dashboard) (require 'dashboard) +(setq dashboard-projects-backend "project-el") (setq dashboard-set-heading-icons t) (setq dashboard-set-file-icons t) -(setq dashboard-startup-banner 'logo) ;; use standard emacs logo as banner (setq dashboard-center-content t) ;; set to 't' for centered content (setq dashboard-items '((recents . 10) (bookmarks . 5))) - ;;(projects . 10))) // TODO after projectile + ;;(projects . 10))) ;; TODO after projectile (setq dashboard-set-footer t) -(setq dashboard-page-separator "\n\n\f\n\n") +(setq dashboard-page-separator "\n\f\n") (setq dashboard-set-navigator t) ;; Format: "(icon title help action face prefix suffix)" (setq dashboard-navigator-buttons @@ -28,11 +28,10 @@ (dashboard-modify-heading-icons '((recents . "file-text") (bookmarks . "book"))) -(setq doom-fallback-buffer-name "*dashboard*") +(setq dashboard-startup-banner (expand-file-name "logo.png" user-emacs-directory)) (require 'linum) (add-hook 'dashboard-mode-hook page-break-lines-mode) - (provide 'custom-dashboard) ;;; custom-dashboard.el end here diff --git a/.config/emacs/modules/custom-evil.el~ b/.config/emacs/modules/custom-evil.el~ deleted file mode 100644 index cf561f5..0000000 --- a/.config/emacs/modules/custom-evil.el~ +++ /dev/null @@ -1,109 +0,0 @@ -;;; crafted-evil.el --- Evil mode configuration -*- lexical-binding: t; -*- - -;; Copyright (C) 2022 -;; SPDX-License-Identifier: MIT - -;; Author: System Crafters Community - -;;; Commentary: - -;; Evil mode configuration, for those who prefer `Vim' keybindings. - -;;; Code: - -(defgroup crafted-evil '() - "Vim-like related configuration for Crafted Emacs." - :tag "Crafted Evil" - :group 'crafted) - -;; Define configuration variables -(define-obsolete-variable-alias - 'rational-evil-discourage-arrow-keys - 'crafted-evil-discourage-arrow-keys - "1") -(defcustom crafted-evil-discourage-arrow-keys nil - "When non-nil, prevent navigation with the arrow keys in Normal state." - :group 'crafted-evil - :type 'boolean) - -(define-obsolete-variable-alias - 'rational-evil-vim-muscle-memory - 'crafted-evil-vim-muscle-memory - "1") -(defcustom crafted-evil-vim-muscle-memory nil - "When non-nil, let evil mode take some of the default keybindings, in order to make a more familiar Vim experience." - :group 'crafted-evil - :type 'boolean) - -;; Install dependencies -(crafted-package-install-package 'evil) -(crafted-package-install-package 'evil-collection) -(crafted-package-install-package 'evil-nerd-commenter) - -;; Turn on undo-tree globally -(when (< emacs-major-version 28) - (crafted-package-install-package 'undo-tree) - (global-undo-tree-mode)) - -;; Set some variables that must be configured before loading the package -(customize-set-variable 'evil-want-integration t) -(customize-set-variable 'evil-want-keybinding nil) -(customize-set-variable 'evil-want-C-i-jump nil) -(customize-set-variable 'evil-respect-visual-line-mode t) -;; C-h is backspace in insert state -(customize-set-variable 'evil-want-C-h-delete t) -(if (< emacs-major-version 28) - (customize-set-variable 'evil-undo-system 'undo-tree) - (customize-set-variable 'evil-undo-system 'undo-redo)) - -(when crafted-evil-vim-muscle-memory - (customize-set-variable 'evil-want-C-i-jump t) - (customize-set-variable 'evil-want-Y-yank-to-eol t) - (customize-set-variable 'evil-want-fine-undo t)) - -;; Load Evil and enable it globally -(require 'evil) -(evil-mode 1) - -;; Make evil search more like vim -(evil-select-search-module 'evil-search-module 'evil-search) - -;; Turn on Evil Nerd Commenter -(evilnc-default-hotkeys) - -;; Make C-g revert to normal state -(define-key evil-insert-state-map (kbd "C-g") 'evil-normal-state) - -;; Rebind `universal-argument' to 'C-M-u' since 'C-u' now scrolls the buffer -(global-set-key (kbd "C-M-u") 'universal-argument) - -;; Use visual line motions even outside of visual-line-mode buffers -(evil-global-set-key 'motion "j" 'evil-next-visual-line) -(evil-global-set-key 'motion "k" 'evil-previous-visual-line) - -(defun crafted-evil/discourage-arrow-keys () - (interactive) - (message "Use HJKL keys instead!")) - -(when crafted-evil-discourage-arrow-keys - ;; Disable arrow keys in normal and visual modes - (define-key evil-normal-state-map (kbd "") 'crafted-evil/discourage-arrow-keys) - (define-key evil-normal-state-map (kbd "") 'crafted-evil/discourage-arrow-keys) - (define-key evil-normal-state-map (kbd "") 'crafted-evil/discourage-arrow-keys) - (define-key evil-normal-state-map (kbd "") 'crafted-evil/discourage-arrow-keys) - (evil-global-set-key 'motion (kbd "") 'crafted-evil/discourage-arrow-keys) - (evil-global-set-key 'motion (kbd "") 'crafted-evil/discourage-arrow-keys) - (evil-global-set-key 'motion (kbd "") 'crafted-evil/discourage-arrow-keys) - (evil-global-set-key 'motion (kbd "") 'crafted-evil/discourage-arrow-keys)) - -;; Make sure some modes start in Emacs state -;; TODO: Split this out to other configuration modules? -(dolist (mode '(custom-mode - eshell-mode - term-mode)) - (add-to-list 'evil-emacs-state-modes mode)) - -(evil-collection-init) - -(provide 'crafted-evil) -;;; crafted-evil.el ends here diff --git a/.config/emacs/modules/custom-org.el b/.config/emacs/modules/custom-org.el new file mode 100644 index 0000000..4495a43 --- /dev/null +++ b/.config/emacs/modules/custom-org.el @@ -0,0 +1,22 @@ +;;; custom-org.el -*- lexical-binding: t; -*- +(crafted-package-install-package 'org-appear) + +;; Return or left-click with mouse follows link +(customize-set-variable 'org-return-follows-link t) +(customize-set-variable 'org-mouse-1-follows-link t) + +;; Display links as the description provided +(customize-set-variable 'org-link-descriptive t) + +;; Hide markup markers +(customize-set-variable 'org-hide-emphasis-markers t) +(add-hook 'org-mode-hook 'org-appear-mode) + +;; disable auto-pairing of "<" in org-mode +(add-hook 'org-mode-hook (lambda () + (setq-local electric-pair-inhibit-predicate + `(lambda (c) + (if (char-equal c ?<) t (,electric-pair-inhibit-predicate c)))))) + +(provide 'custom-org) +;;; custom-org.el ends here