File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 42
42
(cl-defmethod xref-backend-definitions ((_backend (eql phpactor-xref)) symbol)
43
43
(phpactor-xref--find-definitions))
44
44
45
+ (defun phpactor--xref-find-definitions ()
46
+ " Find definitions or jump directly when only one found."
47
+ (phpactor-goto-definition))
48
+
45
49
(cl-defmethod xref-backend-identifier-completion-table ((_backend (eql phpactor-xref)))
46
50
" Return a list of terms for completions taken from the symbols in the current buffer.
47
51
The current implementation returns all the words in the buffer,
@@ -54,12 +58,6 @@ which is really sub optimal."
54
58
(phpactor-xref--make-xref candidate))
55
59
(phpactor-xref--find-candidates)))
56
60
57
- (defun phpactor-xref--find-definitions ()
58
- " Return a list of candidates matching SYMBOL."
59
- (seq-map (lambda (candidate )
60
- (phpactor-xref--make-xref candidate))
61
- (phpactor-xref--find-candidates)))
62
-
63
61
(defun phpactor-xref--make-xref (candidate )
64
62
" Return a new Xref object built from CANDIDATE."
65
63
(xref-make (map-elt candidate 'match )
You can’t perform that action at this time.
0 commit comments