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