File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 3131(require 'company )
3232(require 'phpactor )
3333
34- (defun company-phpactor--get-suggestions (source offset )
34+ (defun company-phpactor--get-suggestions ()
3535 " Get completions for current cursor."
36- (let ((response (phpactor--rpc " complete" (list :source ( buffer-substring-no-properties ( point-min ) ( point-max )) :offset ( point ) ))))
36+ (let ((response (phpactor--rpc " complete" (phpactor--command-argments :source :offset ))))
3737 (plist-get (plist-get (plist-get response :parameters ) :value ) :suggestions )))
3838
3939;;;### autoload
4343 (cl-case command
4444 (interactive (company-begin-backend 'company-phpactor ))
4545 (prefix (company-grab-symbol))
46- (candidates (let ((offset (point ))
47- (source (buffer-substring-no-properties (point-min ) (point-max ))))
48- (all-completions arg (mapcar #' (lambda (suggestion ) (plist-get suggestion :name )) (company-phpactor--get-suggestions source offset)))))))
46+ (candidates (all-completions arg (mapcar #' (lambda (suggestion ) (plist-get suggestion :name )) (company-phpactor--get-suggestions))))))
4947
5048(provide 'company-phpactor )
5149; ;; company-phpactor.el ends here
You can’t perform that action at this time.
0 commit comments