Optimize org-mode loading (not really)

This commit is contained in:
MitchMarq42 2022-08-08 06:36:43 -08:00
parent 3835047619
commit 92cb81e7a3

View File

@ -419,29 +419,28 @@ targets."
:mode (("\\.org$" . org-mode)) :mode (("\\.org$" . org-mode))
:diminish org-indent-mode :diminish org-indent-mode
:custom :custom
(org-ellipsis "")
(org-hide-leading-stars t) (org-hide-leading-stars t)
(org-startup-indented t) (org-startup-indented t)
:config :config
;; (org-indent-mode) (defun local-disable-whitespace ()
;; (add-hook 'org-mode-hook "Disable whitespace-mode in the current buffer."
;; #'(lambda () (setq-local whitespace-style nil))
;; (add-hook 'after-save-hook
;; #'(lambda ()
;; (org-babel-tangle)))))
(add-hook 'after-save-hook (add-hook 'after-save-hook
#'(lambda () (if (equal major-mode 'org-mode) #'(lambda () (if (equal major-mode 'org-mode)
(org-babel-tangle)))) (org-babel-tangle))))
(add-hook 'org-mode-hook (add-hook 'org-mode-hook
#'(lambda () (setq-local whitespace-style nil))) (local-disable-whitespace))
(with-eval-after-load 'org
;; This is needed as of Org 9.2
(require 'org-tempo)
(add-to-list 'org-structure-template-alist '("sh" . "src shell"))
(add-to-list 'org-structure-template-alist '("el" . "src elisp"))
(add-to-list 'org-structure-template-alist '("ps1" . "src powershell")))
:hook (org-mode . turn-off-line-numbers)) :hook (org-mode . turn-off-line-numbers))
(use-package org-tempo
:straight (:type built-in)
:after org
:config
(add-to-list 'org-structure-template-alist '("sh" . "src shell"))
(add-to-list 'org-structure-template-alist '("el" . "src elisp"))
(add-to-list 'org-structure-template-alist '("ps1" . "src powershell"))
(add-to-list 'org-structure-template-alist '("html" . "src html")))
(use-package org-variable-pitch (use-package org-variable-pitch
:if (display-graphic-p)
:diminish (buffer-face-mode org-variable-pitch-minor-mode) :diminish (buffer-face-mode org-variable-pitch-minor-mode)
:config :config
(set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-delimiter-face fixed-pitch)) (set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-delimiter-face fixed-pitch))