File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 2828; ;; Code:
2929(require 'phpactor nil t )
3030(require 'popup nil t )
31+ (require 'smart-jump nil t )
3132
3233(defvar-local php-ui-phpactor-buffer nil )
3334(defvar-local php-ui-phpactor-hover-last-pos nil )
6465(defun php-ui-phpactor-activate ()
6566 " Activate PHP-UI using phpactor.el."
6667 (interactive )
68+ (if (not (fboundp 'smart-jump-go ))
69+ (local-set-key [remap xref-find-definitions] #'phpactor-goto-definition )
70+ (local-set-key [remap xref-find-definitions] #'smart-jump-go )
71+ (local-set-key [remap xref-pop-marker-stack] #'smart-jump-back )
72+ (local-set-key [remap xref-find-references] #'smart-jump-references ))
6773 (unless php-ui-phpactor-timer
6874 (setq php-ui-phpactor-timer (run-with-timer 1.0 1 #'php-ui-phpactor-hover )))
6975 (setq php-ui-phpactor-buffer t ))
7278(defun php-ui-phpactor-deactivate ()
7379 " Dectivate PHP-UI using phpactor.el."
7480 (interactive )
81+ (local-unset-key [remap xref-find-definitions])
82+ (local-unset-key [remap xref-pop-marker-stack])
83+ (local-unset-key [remap xref-find-references])
84+
7585 (when php-ui-phpactor-timer
7686 (cancel-timer php-ui-phpactor-timer)
7787 (setq php-ui-phpactor-timer nil ))
You can’t perform that action at this time.
0 commit comments