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* ((sanitized-kind (if (< kind (length lsp-ivy-symbol-kind-to-face)) kind 0 ))
@@ -157,8 +151,11 @@ FILTER-REGEXPS?, otherwise convert it to an `lsp-ivy:FormattedSymbolInformation'
157
151
(let ((textual-representation
158
152
(lsp-ivy--format-symbol-match symbol-information workspace-root)))
159
153
(when (--all? (string-match-p it textual-representation) filter-regexps?)
160
- (lsp-put symbol-information :textualRepresentation textual-representation)
161
- symbol-information))))
154
+ (cons textual-representation symbol-information)))))
155
+
156
+ (lsp-defun lsp-ivy--workspace-symbol-action ((_ . sym))
157
+ " Jump to the `cdr' of INPUT0, an `&SymbolInformation' ."
158
+ (lsp-ivy--goto-symbol sym))
162
159
163
160
(defun lsp-ivy--workspace-symbol (workspaces prompt initial-input )
164
161
" Search against WORKSPACES with PROMPT and INITIAL-INPUT."
@@ -198,11 +195,6 @@ FILTER-REGEXPS?, otherwise convert it to an `lsp-ivy:FormattedSymbolInformation'
198
195
:action #'lsp-ivy--workspace-symbol-action
199
196
:caller 'lsp-ivy-workspace-symbol )))
200
197
201
- (ivy-configure 'lsp-ivy-workspace-symbol
202
- :display-transformer-fn
203
- (-lambda ((&lsp-ivy:FormattedSymbolInformation :textual-representation ))
204
- textual-representation))
205
-
206
198
;;;### autoload
207
199
(defun lsp-ivy-workspace-symbol (arg )
208
200
" `ivy' for lsp workspace/symbol.
0 commit comments