-
Notifications
You must be signed in to change notification settings - Fork 18
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
Doesn't obey company-minimum-prefix-length
#18
Comments
I fixed it locally this way: (defun as/company-auctex-prefix (regexp)
"Returns the prefix for matching given REGEXP."
(and (derived-mode-p 'latex-mode)
(when (looking-back regexp)
(match-string-no-properties 1))))
(advice-add 'company-auctex-prefix :override 'as/company-auctex-prefix) The |
I tried the fix by @brabalan but it didn't help me. I still get completion for a single character, which is annoying when typing math symbols that usually only have one character. I had posted this originally as a spacemacs problem but I'm not sure where it belongs. In a tex file, typing
Even if I type Any ideas? |
I have the very same problem and would be grateful for any help. |
I have the same issue |
@fredRos this is exactly what I am also experiencing. |
Apparently the problem is with auctex itself syl20bnr/spacemacs#9388 (comment) because it sets a local variable |
As a workaround for the prefix length, I have this in my configuration. (eval-after-load "latex"
'(add-hook 'LaTeX-mode-hook
(lambda ()
(setq company-minimum-prefix-length 4)))) |
I reported this to at company-mode/company-mode#578 but apparently this is an issue with company-auctex. Basically, if
company-minimum-prefix-length
is 2, typing\l
and then backspacing should show no completions (there's only one prefix letter). However, with the company-auctex backend enabled, it completes every latex command.After further investigation, it turns out that this package simply ignores
company-minimum-prefix-length
entirely.\l
is completed (no backspacing) even ifcompany-minimum-prefix-length
is set to 3.The text was updated successfully, but these errors were encountered: