File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 28
28
; ;; Code:
29
29
(require 'phpactor nil t )
30
30
(require 'popup nil t )
31
+ (require 'smart-jump nil t )
31
32
32
33
(defvar-local php-ui-phpactor-buffer nil )
33
34
(defvar-local php-ui-phpactor-hover-last-pos nil )
64
65
(defun php-ui-phpactor-activate ()
65
66
" Activate PHP-UI using phpactor.el."
66
67
(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 ))
67
73
(unless php-ui-phpactor-timer
68
74
(setq php-ui-phpactor-timer (run-with-timer 1.0 1 #'php-ui-phpactor-hover )))
69
75
(setq php-ui-phpactor-buffer t ))
72
78
(defun php-ui-phpactor-deactivate ()
73
79
" Dectivate PHP-UI using phpactor.el."
74
80
(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
+
75
85
(when php-ui-phpactor-timer
76
86
(cancel-timer php-ui-phpactor-timer)
77
87
(setq php-ui-phpactor-timer nil ))
You can’t perform that action at this time.
0 commit comments