118
118
(cons string face)
119
119
(cons string face)))
120
120
121
- (eval-when-compile
122
- (lsp-interface
123
- (lsp-ivy:FormattedSymbolInformation
124
- (:kind :name :location :textualRepresentation )
125
- (:containerName :deprecated ))))
126
-
127
- (lsp-defun lsp-ivy--workspace-symbol-action
121
+ (lsp-defun lsp-ivy--goto-symbol
128
122
((&SymbolInformation
129
123
:location (&Location :uri :range (&Range :start (&Position :line :character )))))
130
124
" Jump to selected candidate."
134
128
(forward-char character))
135
129
136
130
(lsp-defun lsp-ivy--format-symbol-match
137
- ((&SymbolInformation :name :kind :container-name? :location (&Location :uri ))
131
+ ((&SymbolInformation :name :kind :container-name? :deprecated? : location (&Location :uri ))
138
132
project-root)
139
133
" Convert the match returned by `lsp-mode` into a candidate string."
140
134
(let* ((type (elt lsp-ivy-symbol-kind-to-face kind))
@@ -156,8 +150,11 @@ FILTER-REGEXPS?, otherwise convert it to an `lsp-ivy:FormattedSymbolInformation'
156
150
(let ((textual-representation
157
151
(lsp-ivy--format-symbol-match symbol-information workspace-root)))
158
152
(when (--all? (string-match-p it textual-representation) filter-regexps?)
159
- (lsp-put symbol-information :textualRepresentation textual-representation)
160
- symbol-information))))
153
+ (cons textual-representation symbol-information)))))
154
+
155
+ (lsp-defun lsp-ivy--workspace-symbol-action ((_ . sym))
156
+ " Jump to the `cdr' of INPUT0, an `&SymbolInformation' ."
157
+ (lsp-ivy--goto-symbol sym))
161
158
162
159
(defun lsp-ivy--workspace-symbol (workspaces prompt initial-input )
163
160
" Search against WORKSPACES with PROMPT and INITIAL-INPUT."
@@ -197,11 +194,6 @@ FILTER-REGEXPS?, otherwise convert it to an `lsp-ivy:FormattedSymbolInformation'
197
194
:action #'lsp-ivy--workspace-symbol-action
198
195
:caller 'lsp-ivy-workspace-symbol )))
199
196
200
- (ivy-configure 'lsp-ivy-workspace-symbol
201
- :display-transformer-fn
202
- (-lambda ((&lsp-ivy:FormattedSymbolInformation :textual-representation ))
203
- textual-representation))
204
-
205
197
;;;### autoload
206
198
(defun lsp-ivy-workspace-symbol (arg )
207
199
" `ivy' for lsp workspace/symbol.
0 commit comments