[org] Update org-enable-valign

Move the org-enable-valign variable definition
and the valign package setup to the org layer.

Document the variable.
This commit is contained in:
duianto 2021-01-12 13:04:58 +01:00 committed by Maximilian Wolff
parent bf32e43339
commit 7ffcae0360
No known key found for this signature in database
GPG Key ID: 2DD07025BFDBD89A
5 changed files with 27 additions and 13 deletions

View File

@ -26,6 +26,7 @@
- [[#sticky-header-support][Sticky header support]]
- [[#epub-support][Epub support]]
- [[#jira-support][Jira support]]
- [[#valign-support][Valign support]]
- [[#verb-support][Verb support]]
- [[#spacemacs-layout-integration][Spacemacs layout integration]]
- [[#key-bindings][Key bindings]]
@ -73,6 +74,7 @@ This layer enables [[http://orgmode.org/][org mode]] for Spacemacs.
- Project-specific TODOs via [[https://github.com/IvanMalison/org-projectile][org-projectile]]
- Easy insert of URLs from clipboard with org format via [[https://github.com/rexim/org-cliplink][org-cliplink]]
- Rich insert of code (into a source block with highlighting, and a link) from other buffers via [[https://github.com/unhammer/org-rich-yank][org-rich-yank]]
- Pixel-perfect visual alignment for Org and Markdown tables via [[https://github.com/casouri/valign][valign]]
* BibTeX
For more extensive support of references through BibTeX files, have a look at
@ -356,6 +358,18 @@ you connect, add your authentication credentials to =~/.authinfo.gpg= or
machine yourcompany.atlassian.net login you@example.com password yourPassword port 443
#+END_SRC
** Valign support
To install [[https://github.com/casouri/valign][valign]]. Which provides:
Pixel-perfect visual alignment for Org and Markdown tables.
Set the variable =org-enable-valign= to =t=:
#+BEGIN_SRC emacs-lisp
(setq-default dotspacemacs-configuration-layers
'((org :variables org-enable-valign t)))
#+END_SRC
[[https://github.com/casouri/valign#valignel][Known problem: Rendering large tables (≥100 lines) is laggy.]]
** Verb support
To install [[https://github.com/federicotdn/verb][Verb]], an HTTP client based on Org mode, set the
=org-enable-verb-support= variable to =t=:

View File

@ -64,3 +64,7 @@ are configured.")
(defvar org-persp-startup-with-agenda nil
"If non-nil, opens the specified agenda custom view")
(defvar org-enable-valign nil
"If non-nil, enable valign-mode in org-mode buffers.
ATTENTION: `valign-mode' will be laggy working with tables contain more than 100 lines.")

View File

@ -47,6 +47,7 @@
(org-sticky-header :toggle org-enable-sticky-header)
(verb :toggle org-enable-verb-support)
(org-roam :toggle org-enable-roam-support)
(valign :toggle org-enable-valign)
))
(defun org/post-init-company ()
@ -937,3 +938,11 @@ Headline^^ Visit entry^^ Filter^^ Da
(defun org/pre-init-verb ()
(spacemacs|use-package-add-hook org
:post-config (add-to-list 'org-babel-load-languages '(verb . t))))
(defun org/init-valign ()
(use-package valign
:init
(progn
(add-hook 'org-mode-hook 'valign-mode)
(add-hook 'valign-mode-hook (lambda () (unless valign-mode
(valign-remove-advice)))))))

View File

@ -10,7 +10,3 @@
;;; License: GPLv3
;; Variables
(defvar org-enable-valign nil
"If non-nil, enable valign-mode in org-mode buffers.
ATTENTION: `valign-mode' will be laggy working with tables contain more than 100 lines.")

View File

@ -25,7 +25,6 @@
org-superstar
(space-doc :location local)
toc-org
(valign :toggle org-enable-valign)
))
(defun spacemacs-org/post-init-flyspell ()
@ -76,14 +75,6 @@
(setq toc-org-max-depth 10)
(add-hook 'org-mode-hook 'toc-org-enable))))
(defun spacemacs-org/init-valign ()
(use-package valign
:init
(progn
(add-hook 'org-mode-hook 'valign-mode)
(add-hook 'valign-mode-hook (lambda () (unless valign-mode
(valign-remove-advice)))))))
(defun spacemacs-org/init-space-doc ()
(add-hook 'org-mode-hook 'dotspacemacs//prettify-spacemacs-docs))