emacs-lsp / lsp-ui

UI integrations for lsp-mode
https://emacs-lsp.github.io/lsp-ui
GNU General Public License v3.0
1.03k stars 141 forks source link

Long file paths in lsp-ui-peek-find show only prefix #744

Open nenorbot opened 1 year ago

nenorbot commented 1 year ago

When working with highly nested directories, the paths shown in the file list get truncated to just their prefix. As a result, the most meaningful parts of the path are often lost (package/modules/file name/etc).

For example, in Rust, when finding references/implementations of a type that's used across many dependencies, the file list might only show identical entries for /home/myuser/.cargo/registry/src/github..., making the file list harder to work with.

I know it's possible to disable showing directories with lsp-ui-peek-show-directory, but the directories can have interesting information like project name or module paths.

I think showing the path suffix rather than the prefix would be more helpful in these cases.

tonicebrian commented 11 months ago

This is also being discussed in https://github.com/emacs-lsp/lsp-ui/issues/261