@@ -176,21 +176,6 @@ if UP is non-nil, it loops on the previous lines.."
176176 (seq-do 'delete-overlay lsp-ui-sideline--ovs)
177177 (setq lsp-ui-sideline--ovs nil ))
178178
179- (defun lsp-ui-sideline--get-renderer (language )
180- " Return a function to fontify a string in LANGUAGE."
181- (thread-last lsp--cur-workspace
182- lsp--workspace-client
183- lsp--client-string-renderers
184- (assoc-string language)
185- cdr ))
186-
187- (defun lsp-ui-sideline--get-language ()
188- " Return the language of the buffer."
189- (thread-first lsp--cur-workspace
190- lsp--workspace-client
191- lsp--client-language-id
192- (funcall (current-buffer ))))
193-
194179(defun lsp-ui-sideline--extract-info (contents )
195180 " Extract the line to print from CONTENTS.
196181CONTENTS can be differents type of values:
@@ -202,11 +187,11 @@ function signature)."
202187 ((stringp contents) contents)
203188 ((sequencep contents) ; ; MarkedString[]
204189 (seq-find (lambda (it ) (and (hash-table-p it)
205- (lsp-ui-sideline-- get-renderer (gethash " language" it))))
190+ (lsp-get-renderer (gethash " language" it))))
206191 contents))
207192 ((gethash " kind" contents) (gethash " value" contents)) ; ; MarkupContent
208193 ((gethash " language" contents) ; ; MarkedString
209- (and (lsp-ui-sideline-- get-renderer (gethash " language" contents))
194+ (and (lsp-get-renderer (gethash " language" contents))
210195 (gethash " value" contents))))))
211196
212197(defun lsp-ui-sideline--format-info (marked-string )
@@ -218,7 +203,7 @@ MARKED-STRING is the string returned by `lsp-ui-sideline--extract-info'."
218203 (when (hash-table-p marked-string)
219204 (let* ((language (gethash " language" marked-string))
220205 (value (gethash " value" marked-string))
221- (renderer (lsp-ui-sideline-- get-renderer language)))
206+ (renderer (lsp-get-renderer language)))
222207 (setq marked-string (if (and (functionp renderer) value)
223208 (funcall renderer value)
224209 value))))
@@ -384,8 +369,7 @@ CURRENT is non-nil when the point is on the symbol."
384369It loops on the symbols of the current line and request information
385370to the language server."
386371 (lsp-ui-sideline--delete-ov)
387- (when (and lsp--cur-workspace
388- buffer-file-name)
372+ (when buffer-file-name
389373 (let ((eol (line-end-position ))
390374 (bol (line-beginning-position ))
391375 (tag (lsp-ui-sideline--calculate-tag))
0 commit comments