Let org-mode export syntax-highlighted code blocks
This commit is contained in:
parent
f97826cc3c
commit
da8395a706
61
init.el
61
init.el
|
@ -476,6 +476,8 @@
|
|||
:config
|
||||
(pdf-tools-install))
|
||||
|
||||
(use-package engrave-faces)
|
||||
|
||||
(use-package org
|
||||
:hook
|
||||
(org-mode . auto-fill-mode)
|
||||
|
@ -496,6 +498,7 @@
|
|||
;; NixOS minimal LaTeX setup
|
||||
(org-latex-compiler "lualatex")
|
||||
(org-preview-latex-default-process 'dvisvgm)
|
||||
(org-latex-src-block-backend 'engraved)
|
||||
:config
|
||||
(setq org-format-latex-options (plist-put org-format-latex-options :scale 1.1)
|
||||
org-modules (append '(org-tempo org-habit) org-modules))
|
||||
|
@ -544,6 +547,9 @@
|
|||
:ensure nil
|
||||
:hook org-modern-mode)
|
||||
|
||||
(use-package djvu)
|
||||
(use-package nov)
|
||||
|
||||
(use-package org-pdftools
|
||||
:hook (org-mode . org-pdftools-setup-link))
|
||||
|
||||
|
@ -590,39 +596,31 @@
|
|||
|
||||
(use-package meson-mode)
|
||||
|
||||
(defun my-org-spell-fu-faces-exclude ()
|
||||
(setq spell-fu-faces-exclude
|
||||
'(org-block-begin-line
|
||||
org-block-end-line
|
||||
org-code
|
||||
org-date
|
||||
org-drawer org-document-info-keyword
|
||||
org-ellipsis
|
||||
org-link
|
||||
org-meta-line
|
||||
org-properties
|
||||
org-properties-value
|
||||
org-special-keyword
|
||||
org-src
|
||||
org-tag
|
||||
org-verbatim)))
|
||||
|
||||
(use-package spell-fu
|
||||
:hook
|
||||
text-mode
|
||||
(org-mode . my-org-spell-fu-faces-exclude))
|
||||
(org-mode . (lambda ()
|
||||
(setq spell-fu-faces-exclude
|
||||
'(org-block-begin-line
|
||||
org-block-end-line
|
||||
org-code
|
||||
org-date
|
||||
org-drawer org-document-info-keyword
|
||||
org-ellipsis
|
||||
org-link
|
||||
org-meta-line
|
||||
org-properties
|
||||
org-properties-value
|
||||
org-special-keyword
|
||||
org-src
|
||||
org-tag
|
||||
org-verbatim)))))
|
||||
|
||||
(use-package minimap
|
||||
:custom-face
|
||||
(minimap-active-region-background ((t (:background unspecified :inherit hl-line))))
|
||||
:hook (minimap-sb-mode . turn-on-solaire-mode))
|
||||
|
||||
(defun my-magit-commit-text-setup ()
|
||||
(git-commit-turn-on-auto-fill)
|
||||
(spell-fu-mode)
|
||||
(setq-local spell-fu-check-range #'my-magit-spell-fu-check-range)
|
||||
(spell-fu--time-ensure t))
|
||||
|
||||
(defun my-magit-spell-fu-check-range (pos-beg pos-end)
|
||||
(spell-fu--overlays-remove pos-beg pos-end)
|
||||
(with-syntax-table spell-fu-syntax-table
|
||||
|
@ -644,7 +642,11 @@
|
|||
(forward-line)))))))
|
||||
|
||||
(use-package magit
|
||||
:hook (git-commit-setup . my-magit-commit-text-setup))
|
||||
:hook (git-commit-setup . (lambda ()
|
||||
(git-commit-turn-on-auto-fill)
|
||||
(spell-fu-mode)
|
||||
(setq-local spell-fu-check-range #'my-magit-spell-fu-check-range)
|
||||
(spell-fu--time-ensure t))))
|
||||
|
||||
(use-package forge
|
||||
:after magit
|
||||
|
@ -770,6 +772,7 @@
|
|||
(catppuccin-flavor 'mocha)
|
||||
(catppuccin-highlight-matches t)
|
||||
(catppuccin-italic-comments t)
|
||||
(catppuccin-italic-blockquotes t)
|
||||
(catppuccin-italic-variables t))
|
||||
|
||||
(defun my-load-theme-with-solaire ()
|
||||
|
@ -995,17 +998,17 @@
|
|||
(interactive)
|
||||
(scroll-up 3))
|
||||
|
||||
(defun frame-make-detect-term (&optional frame)
|
||||
(defun my-frame-make-detect-term (&optional frame)
|
||||
"Check when FRAME are made in order to make terminal-only configurations."
|
||||
(unless (display-graphic-p frame)
|
||||
(xterm-mouse-mode)
|
||||
(global-set-key (kbd "<mouse-4>") #'scroll-down-3)
|
||||
(global-set-key (kbd "<mouse-5>") #'scroll-up-3)
|
||||
(remove-hook 'after-make-frame-functions #'frame-make-detect-term)))
|
||||
(remove-hook 'after-make-frame-functions #'my-frame-make-detect-term)))
|
||||
|
||||
(if (daemonp)
|
||||
(add-to-list 'after-make-frame-functions #'frame-make-detect-term)
|
||||
(frame-make-detect-term))
|
||||
(add-to-list 'after-make-frame-functions #'my-frame-make-detect-term)
|
||||
(my-frame-make-detect-term))
|
||||
|
||||
(defun my-sudo-edit ()
|
||||
"Edit current file as root."
|
||||
|
|
Loading…
Reference in a new issue