emacs-lsp / lsp-ui

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

Show relative path in peek #261

Open finalpatch opened 5 years ago

finalpatch commented 5 years ago

Right now lsp-ui-peek shows full path, so the file name part is usually truncated by the window border. I can only see the first half of the path to every file, which are all identical, and doesn't provide any value.

I suggest change this to show path relative to project root. This will make the path a lot more useful and waste less space.

finalpatch commented 5 years ago

Or at least provide a customize option to show relative path

yyoncho commented 5 years ago

are the files under the current project root?

finalpatch commented 5 years ago

Yes they are in a git repository, which is considered a project root. I don't use projectile though.

c02y commented 2 years ago

I think relative path is not enough, for example, I'm using Rust, the path in the peek would be something like

/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/time.rs

The path is so long, when I use multiple windows in one frame, I only see a small part of it, I have to maximize the current window to get the full path. But I only care about the head and tail parts.

tonicebrian commented 1 year ago

Does someone has a solution for this?