File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 272272 (view-mode 1 ))
273273 (pop-to-buffer buffer)))
274274
275+ (cl-defun phpactor-action-return (&key value )
276+ " Return var from Phpactor."
277+ value)
278+
275279(defvar phpactor-references nil )
276280
277281(cl-defun phpactor-action-file-references (&key file_references )
@@ -620,5 +624,19 @@ function."
620624 (let ((arguments (phpactor--command-argments :source :path :offset )))
621625 (apply #'phpactor-action-dispatch (phpactor--rpc " references" (append arguments (list :mode " replace" ))))))
622626
627+ ;;;### autoload
628+ (defun phpactor-file-information ()
629+ " Execute Phpactor PRC file_info command to gather file informations."
630+ (interactive )
631+ (let ((arguments (phpactor--command-argments :path )))
632+ (apply #'phpactor-action-dispatch (phpactor--rpc " file_info" arguments))))
633+
634+ ;;;### autoload
635+ (defun phpactor-insert-namespace ()
636+ " Find namespace for current file."
637+ (interactive )
638+ (let ((file-info (phpactor-file-information)))
639+ (insert (plist-get file-info :class_namespace ))))
640+
623641(provide 'phpactor )
624642; ;; phpactor.el ends here
You can’t perform that action at this time.
0 commit comments