Skip to content

Commit 537ca19

Browse files
committed
Inject suggestions from the argument
1 parent 11b0393 commit 537ca19

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

company-phpactor.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,10 @@ Here we create a temporary syntax table in order to add $ to symbols."
6262
(let ((response (phpactor--rpc "complete" (phpactor--command-argments :source :offset))))
6363
(plist-get (plist-get (plist-get response :parameters) :value) :suggestions)))
6464

65-
(defun company-phpactor--get-candidates ()
65+
(defun company-phpactor--get-candidates (&optional suggestions)
6666
"Build a list of candidates with text-properties extracted from phpactor's output."
67-
(let ((suggestions (company-phpactor--get-suggestions)) candidate)
67+
(let ((suggestions (or suggestions (company-phpactor--get-suggestions)))
68+
candidate)
6869
(mapcar
6970
(lambda (suggestion)
7071
(setq candidate (plist-get suggestion :name))

0 commit comments

Comments
 (0)