File tree Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -1323,6 +1323,8 @@ meaning."
1323
1323
:group 'lsp-rust-analyzer
1324
1324
:package-version '(lsp-mode . " 8.0.0" ))
1325
1325
1326
+ (defvar lsp-rust-analyzer-already-warned-about-inlay-hint-type nil )
1327
+
1326
1328
(defun lsp-rust-analyzer-update-inlay-hints (buffer )
1327
1329
(if (and (lsp-rust-analyzer-initialized?)
1328
1330
(eq buffer (current-buffer )))
@@ -1340,12 +1342,21 @@ meaning."
1340
1342
(pos (lsp--position-to-point position))
1341
1343
(overlay (make-overlay pos pos nil 'front-advance 'end-advance )))
1342
1344
(let ((concat-label
1343
- (string-join
1344
- (mapcar
1345
- (lambda (label )
1346
- (when (lsp-structure-p label)
1347
- (gethash " value" label " " )))
1348
- label))))
1345
+ (cl-typecase label
1346
+ (vector
1347
+ (string-join
1348
+ (mapcar
1349
+ (lambda (label )
1350
+ (when (lsp-structure-p label)
1351
+ (gethash " value" label " " )))
1352
+ label)))
1353
+ (string
1354
+ label)
1355
+ (t
1356
+ (unless lsp-rust-analyzer-already-warned-about-inlay-hint-type
1357
+ (message " Unexpected type for inlay hint: %s " (type-of label))
1358
+ (setq lsp-rust-analyzer-already-warned-about-inlay-hint-type t ))
1359
+ " " ))))
1349
1360
(overlay-put overlay 'lsp-rust-analyzer-inlay-hint t )
1350
1361
(overlay-put overlay 'before-string
1351
1362
(format " %s%s%s "
You can’t perform that action at this time.
0 commit comments