File tree Expand file tree Collapse file tree 1 file changed +7
-14
lines changed Expand file tree Collapse file tree 1 file changed +7
-14
lines changed Original file line number Diff line number Diff line change 51
51
52
52
(defun lsp-ivy--workspace-symbol (workspaces prompt initial-input )
53
53
" Search against WORKSPACES with PROMPT and INITIAL-INPUT."
54
- (let ((candidates nil )
55
- (current-request-id nil ))
54
+ (let ((current-request-id nil ))
56
55
(ivy-read
57
56
prompt
58
57
(lambda (user-input )
67
66
(plist-get request :id ))
68
67
(lsp-send-request-async
69
68
request
70
- (lambda (incoming-candidates )
71
- (ivy-update-candidates
72
- (mapcar
73
- #'lsp-ivy--format-symbol-match
74
- (setq candidates incoming-candidates))))
69
+ #'ivy-update-candidates
75
70
:mode 'detached )))
76
71
0 )
77
72
:dynamic-collection t
78
73
:require-match t
79
74
:initial-input initial-input
80
- :action (lambda (result )
81
- (let ((match
82
- (cl-find-if
83
- (lambda (it ) (string-equal result (lsp-ivy--format-symbol-match it)))
84
- candidates)))
85
- (when match
86
- (lsp-ivy--workspace-symbol-action match )))))))
75
+ :action #'lsp-ivy--workspace-symbol-action
76
+ :caller 'lsp-ivy-workspace-symbol )))
77
+
78
+ (ivy-configure 'lsp-ivy-workspace-symbol
79
+ :display-transformer-fn #'lsp-ivy--format-symbol-match )
87
80
88
81
;;;### autoload
89
82
(defun lsp-ivy-workspace-symbol (arg )
You can’t perform that action at this time.
0 commit comments