File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change 112
112
113
113
114
114
(defun lsp-ivy--format-symbol-match (match )
115
- " Convert the (hash-valued) MATCH returned by `lsp-mode` into a candidate string."
116
- (let* ((container-name (gethash " containerName" match ))
115
+ " Convert the MATCH returned by `lsp-mode` into a candidate string.
116
+ MATCH is a cons cell whose cdr is the hash-table from `lsp-mode`."
117
+ (let* ((match (cdr match ))
118
+ (container-name (gethash " containerName" match ))
117
119
(name (gethash " name" match ))
118
120
(type (elt lsp-ivy-symbol-kind-to-face (gethash " kind" match ) ))
119
121
(typestr (if lsp-ivy-show-symbol-kind
124
126
(format " %s .%s " container-name name)))))
125
127
126
128
(defun lsp-ivy--workspace-symbol-action (candidate )
127
- " Jump to selected CANDIDATE."
128
- (-let* (((&hash " uri" " range" (&hash " start" (&hash " line" " character" )))
129
+ " Jump to selected CANDIDATE, a cons cell whose cdr is a hash table."
130
+ (-let* ((candidate (cdr candidate))
131
+ ((&hash " uri" " range" (&hash " start" (&hash " line" " character" )))
129
132
(gethash " location" candidate)))
130
133
(find-file (lsp--uri-to-path uri))
131
134
(goto-char (point-min ))
145
148
" workspace/symbol"
146
149
(list :query user-input)
147
150
(lambda (result )
148
- (ivy-update-candidates (-remove 'lsp-ivy--filter-func result)))
151
+ (ivy-update-candidates
152
+ (mapcar
153
+ (lambda (data )
154
+ (cons (gethash " name" data) data))
155
+ (-remove 'lsp-ivy--filter-func result))))
149
156
:mode 'detached
150
157
:cancel-token :workspace-symbol ))
151
158
0 )
You can’t perform that action at this time.
0 commit comments