<commit_before>;;; lang/org/config.el -*- lexical-binding: t; -*-

(defvar +org-dir (expand-file-name "~/org/")
  "The directory where org files are kept.")

;; Sub-modules
(if (featurep! +attach)  (load! "+attach"))
(if (featurep! +babel)   (load! "+babel"))
(if (featurep! +capture) (load! "+capture"))
(if (featurep! +export)  (load! "+export"))
(if (featurep! +present) (load! "+present"))
;; TODO (if (featurep! +publish) (load! "+publish"))


;;
;; Plugins
;;

;; `toc-org'
(setq toc-org-hrefify-default "org")

(def-package! evil-org
  :when (featurep! :feature evil)
  :hook (org-mode . evil-org-mode)
  :hook (org-load . evil-org-set-key-theme)
  :init
  (setq evil-org-key-theme '(navigation insert textobjects))
  (add-hook 'org-load-hook #'+org|setup-evil)
  (add-hook 'evil-org-mode-hook #'evil-normalize-keymaps))

(def-package! evil-org-agenda
  :when (featurep! :feature evil)
  :after org-agenda
  :config (evil-org-agenda-set-keys))


;;
;; Bootstrap
;;

(add-hook! 'org-load-hook
  #'(org-crypt-use-before-save-magic
     +org|setup-ui
     +org|setup-popups-rules
     +org|setup-agenda
     +org|setup-keybinds
     +org|setup-hacks))

(add-hook! 'org-mode-hook
  #'(doom|disable-line-numbers  ; org doesn't really need em
     org-bullets-mode           ; "prettier" bullets
     org-indent-mode            ; margin-based indentation
     toc-org-enable             ; auto-table of contents
     auto-fill-mode             ; line wrapping

     +org|enable-auto-reformat-tables
     +org|enable-auto-update-cookies
     +org|smartparens-compatibility-config
     +org|unfold-to-2nd-level-or-point<commit_msg>Tie evil-org/evil-org-agenda to +everywhere flag<commit_after>;;; lang/org/config.el -*- lexical-binding: t; -*-

(defvar +org-dir (expand-file-name "~/org/")
  "The directory where org files are kept.")

;; Sub-modules
(if (featurep! +attach)  (load! "+attach"))
(if (featurep! +babel)   (load! "+babel"))
(if (featurep! +capture) (load! "+capture"))
(if (featurep! +export)  (load! "+export"))
(if (featurep! +present) (load! "+present"))
;; TODO (if (featurep! +publish) (load! "+publish"))


;;
;; Plugins
;;

;; `toc-org'
(setq toc-org-hrefify-default "org")

(def-package! evil-org
  :when (featurep! :feature evil +everywhere)
  :hook (org-mode . evil-org-mode)
  :hook (org-load . evil-org-set-key-theme)
  :init
  (setq evil-org-key-theme '(navigation insert textobjects))
  (add-hook 'org-load-hook #'+org|setup-evil)
  (add-hook 'evil-org-mode-hook #'evil-normalize-keymaps))

(def-package! evil-org-agenda
  :when (featurep! :feature evil +everywhere)
  :after org-agenda
  :config (evil-org-agenda-set-keys))


;;
;; Bootstrap
;;

(add-hook! 'org-load-hook
  #'(org-crypt-use-before-save-magic
     +org|setup-ui
     +org|setup-popups-rules
     +org|setup-agenda
     +org|setup-keybinds
     +org|setup-hacks))

(add-hook! 'org-mode-hook
  #'(doom|disable-line-numbers  ; org doesn't really need em
     org-bullets-mode           ; "prettier" bullets
     org-indent-mode            ; margin-based indentation
     toc-org-enable             ; auto-table of contents
     auto-fill-mode             ; line wrapping

     +org|enable-auto-reformat-tables
     +org|enable-auto-update-cookies
     +org|smartparens-compatibility-config
     +org|unfold-to-2nd-level-or-point
{'fraction_non_alphanumeric': 0.17987345586019884, 'fraction_numerical': 0.0006025911419102139, 'mean_word_length': 3.2618741976893455, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5599521', 'n_tokens_mistral': 1260, 'n_tokens_neox': 1218, 'n_words': 245}