fix(emacs/lean-mode): run company-lean--check-prefix before auto-complete
fix #191
This commit is contained in:
parent
27b20c5585
commit
1527efb108
2 changed files with 9 additions and 3 deletions
|
@ -22,6 +22,12 @@
|
|||
(setq-local company-begin-commands '(self-insert-command)) ; start autocompletion only after typing
|
||||
(company-mode t))
|
||||
|
||||
(defun company-lean--check-prefix ()
|
||||
"Check whether to use company-lean or not"
|
||||
(or (company-lean--import-prefix)
|
||||
(company-lean--findg-prefix)
|
||||
(company-lean--findp-prefix)))
|
||||
|
||||
(defun company-lean--import-remove-lean (file-name)
|
||||
(cond
|
||||
((s-ends-with? "/default.lean" file-name)
|
||||
|
|
|
@ -67,9 +67,9 @@
|
|||
(interactive)
|
||||
(if (minibufferp)
|
||||
(minibuffer-complete)
|
||||
(cond (lean-company-use
|
||||
(or (company-complete)
|
||||
(eri-indent)))
|
||||
(cond ((and lean-company-use (company-lean--check-prefix))
|
||||
(company-complete-common))
|
||||
(lean-company-use (eri-indent))
|
||||
((lean-check-expansion)
|
||||
(completion-at-point-functions))
|
||||
(t (eri-indent)))))
|
||||
|
|
Loading…
Reference in a new issue