Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion company-phpactor.el
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ Here we create a temporary syntax table in order to add $ to symbols."
candidate)
suggestions)))

(defun company-phpactor--get-candidates-async (callback)
"Get completion candidates asynchronously."
(funcall callback (company-phpactor--get-candidates)))

(defun company-phpactor--post-completion (arg)
"Trigger auto-import of completed item ARG when relevant."
(if (get-text-property 0 'class_import arg)
Expand All @@ -87,7 +91,9 @@ Here we create a temporary syntax table in order to add $ to symbols."
(`annotation (company-phpactor--annotation arg))
(`interactive (company-begin-backend 'company-phpactor))
(`prefix (company-phpactor--grab-symbol))
(`candidates (company-phpactor--get-candidates))))))
(`candidates
(cons :async (lambda (callback)
(company-phpactor--get-candidates-async callback))))))))

(provide 'company-phpactor)
;;; company-phpactor.el ends here