mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
fix(org): don't expand latex snippets in latex segments
Yasnippet expanding snippets (on TAB) from another mode can cause org-element warnings. Until this interop is resolved, best to not make TAB too smart. It still works in src blocks, however. Fix: #8363
This commit is contained in:
@ -472,11 +472,9 @@ Made for `org-tab-first-hook'."
|
||||
(when (and (modulep! :editor snippets)
|
||||
(require 'yasnippet nil t)
|
||||
(bound-and-true-p yas-minor-mode))
|
||||
(let ((major-mode (cond ((org-in-src-block-p t)
|
||||
(org-src-get-lang-mode (org-eldoc-get-src-lang)))
|
||||
((org-inside-LaTeX-fragment-p)
|
||||
'latex-mode)
|
||||
(major-mode)))
|
||||
(let ((major-mode (if (org-in-src-block-p t)
|
||||
(org-src-get-lang-mode (org-eldoc-get-src-lang))
|
||||
major-mode))
|
||||
(org-src-tab-acts-natively nil) ; causes breakages
|
||||
;; Smart indentation doesn't work with yasnippet, and painfully slow
|
||||
;; in the few cases where it does.
|
||||
|
Reference in New Issue
Block a user