summaryrefslogtreecommitdiff
path: root/emacs/inits/24-latex.el
diff options
context:
space:
mode:
authortslil clingman <>2020-05-15 15:42:04 -0700
committertslil clingman <>2020-05-15 15:42:04 -0700
commitd23cae9aeac7a0c26ec44cddfa595471cace0514 (patch)
treed5e5ede3fb3998182ee324c21b912d791890cb2e /emacs/inits/24-latex.el
parent299b171de274000ab6af5ae5fbaf3caaeabb086e (diff)
company-reftex wasn't refreshing the labels cache
This is hardly the correct fix, as it courses my screen to flicker every time i call company, but at least it works. I'm open to suggestions here, reader.
Diffstat (limited to 'emacs/inits/24-latex.el')
-rw-r--r--emacs/inits/24-latex.el18
1 files changed, 12 insertions, 6 deletions
diff --git a/emacs/inits/24-latex.el b/emacs/inits/24-latex.el
index 14a022d..a13a35b 100644
--- a/emacs/inits/24-latex.el
+++ b/emacs/inits/24-latex.el
@@ -1,4 +1,4 @@
-;; Time-stamp: <2020-05-14 14:33:14 (tslil@forfeit)>
+;; Time-stamp: <2020-05-15 14:27:58 (tslil@forfeit)>
(defvar latex-template-dir (expand-file-name "~/academic/typeset/latex-templates"))
(defun prompt-latex-file-template ()
@@ -24,7 +24,16 @@ populated from the directory *latex-template-dir*"
(use-package company-auctex :ensure t :defer t)
-(use-package company-reftex :ensure t :defer t)
+(use-package company-reftex :ensure t
+ :defer t
+ :config
+ (defun company-reftex-label-candidates (prefix)
+ "Find all label candidates matching PREFIX."
+ (reftex-access-scan-info t) ; This t is the difference i wanted
+ (cl-loop for entry in (symbol-value reftex-docstruct-symbol)
+ if (and (stringp (car entry)) (string-prefix-p prefix (car entry)))
+ collect
+ (company-reftex-annotate (car entry) (cl-caddr entry)))))
(use-package unfill :ensure t)
@@ -153,12 +162,8 @@ populated from the directory *latex-template-dir*"
cdlatex-math-symbol-prefix ?`
cdlatex-math-modify-alist '((?a "\\mathbb" nil t nil nil)
(?c "\\mathcal" "\\textsc" t nil nil)
- (?t "\\trm" "\\trm" t nil nil)
- (?y "\\ty" "\\ty" t nil nil)
(?v "\\texttt" "\\texttt" t nil nil)
- (?u "\\tyu" "\\tyu" t nil nil)
(?k "\\mathfrak" nil t nil nil)
- (?` nil "`'" t nil nil)
(?- "\\overline" nil t nil nil)
(?_ "\\underline" nil t nil nil))
cdlatex-math-symbol-alist '((?^ ("\\widehat{?}" "\\hat{?}"))
@@ -184,6 +189,7 @@ populated from the directory *latex-template-dir*"
(?j ("{\\id^{h}}_{?}" "{\\id^{v}}_{?}"))
(?r ("\\rho" "\\varrho" "\\restrict{?}"))
(?u ("\\upsilon" "\\cup" "\\sqcup"))
+ (?y ("\\psi" "\\Psi"))
(?{ ("\\subseteq" "\\subsetneq"))
(?} ("\\supseteq" "\\supsetneq"))
)))