-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't display the math symbols represented by company-math. #18
Comments
Hi @hongyi-zhao Check your You can invoke the backend one by one like so |
See the following given by
I tried with |
Your latest screenshot is from company-capf, not from company-math backends. What is the value of company-backends in your tex buffer? |
I'm currently use (straight-use-package
`(auctex :type git :host nil :repo "https://git.savannah.gnu.org/git/auctex.git"
:pre-build ,(pcase system-type
(`berkeley-unix '("gmake"))
(_ '(
`("bash" "-c" "cd" ,(straight--repos-dir "auctex"))
("./autogen.sh")
("./configure" "--without-texmf-dir" "--with-lispdir=.")
("make")
)))))
(setq TeX-data-directory (straight--repos-dir "auctex")
TeX-lisp-directory TeX-data-directory)
; Or set the following variable via custom-set-variables in the opened buffer by the following command.
; M-x describe-variable RET preview-TeX-style-dir RET
;`(preview-TeX-style-dir ,(concat ".:" (straight--repos-dir "auctex") "latex:"))
(setq preview-TeX-style-dir (concat ".:" (straight--repos-dir "auctex") "latex:"))
(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)
(use-package eglot
:hook
((TeX-mode . eglot-ensure))
:config
(add-to-list 'eglot-server-programs
'((latex-mode tex-mode context-mode texinfo-mode bibtex-mode) . ("texlab"))))
(use-package company
:custom
(company-idle-delay 0)
(company-minimum-prefix-length 1)
(company-tooltip-align-annotations t)
(company-dabbrev-downcase nil)
(company-dabbrev-other-buffers t) ; search buffers with the same major mode
:bind
( :map company-active-map
("RET" . nil)
([return] . nil)
("C-w" . nil)
("TAB" . company-complete-selection)
("<tab>" . company-complete-selection)
("C-s" . company-complete-selection) ; Mostly to use during yasnippet expansion
("C-n" . company-select-next)
("C-p" . company-select-previous))
:hook
;(dashboard-after-initialize . global-company-mode)
; https://emacs.stackexchange.com/questions/39256/how-to-avail-of-hook-using-use-package
(after-init . global-company-mode)
:config
(add-to-list 'company-begin-commands 'backward-delete-char-untabify))
(use-package company-math)
;; local configuration for TeX modes
(defun my/latex-mode-setup ()
(setq-local company-backends
(append '((company-math-symbols-latex company-math-symbols-unicode company-latex-commands))
company-backends)))
;If you are using AUCTeX you might need to use TeX-mode-hook instead:
(add-hook 'TeX-mode-hook 'my/latex-mode-setup) |
As expected, your configuration is not being triggered. Try |
No, |
I've figured out a workable configuration as shown here. So close this issue for now. |
On Ubuntu 20.04, I test the company-math package with some symbols listed in The Comprehensive LATEX Symbol List in Emacs/AUCTeX with some of the same symbols shown here. The Emacs configuration is as follows:
But I can't get the same display results represented here, see the following screenshots for more detailed info:
Any hints for this problem will be highly appreciated.
Regards,
HY
The text was updated successfully, but these errors were encountered: