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 )
@@ -593,5 +597,19 @@ function."
593597 (let ((arguments (phpactor--command-argments :source :path :offset )))
594598 (apply #'phpactor-action-dispatch (phpactor--rpc " references" (append arguments (list :mode " replace" ))))))
595599
600+ ;;;### autoload
601+ (defun phpactor-file-information ()
602+ " Execute Phpactor PRC file_info command to gather file informations."
603+ (interactive )
604+ (let ((arguments (phpactor--command-argments :path )))
605+ (apply #'phpactor-action-dispatch (phpactor--rpc " file_info" arguments))))
606+
607+ ;;;### autoload
608+ (defun phpactor-insert-namespace ()
609+ " Find namespace for current file."
610+ (interactive )
611+ (let ((file-info (phpactor-file-information)))
612+ (insert (plist-get file-info :class_namespace ))))
613+
596614(provide 'phpactor )
597615; ;; phpactor.el ends here
You can’t perform that action at this time.
0 commit comments