We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 295d898 commit 7e947c3Copy full SHA for 7e947c3
lsp-ui-peek.el
@@ -314,7 +314,14 @@ XREFS is a list of references/definitions."
314
(len-str (number-to-string count)))
315
(setq lsp-ui-peek--size-list (+ lsp-ui-peek--size-list count))
316
(push (concat (propertize (if lsp-ui-peek-show-directory
317
- (lsp-ui--workspace-path filename)
+ (let ((path (lsp-ui--workspace-path filename)))
318
+ (if (> (length path) lsp-ui-peek-list-width)
319
+ (let* ((path (substring path (- (length path) lsp-ui-peek-list-width)))
320
+ (dir-start (string-match-p (f-path-separator) path)))
321
+ (if dir-start
322
+ (concat "..." (substring path dir-start))
323
+ path))
324
325
(file-name-nondirectory filename))
326
'face 'lsp-ui-peek-filename
327
'file filename
0 commit comments