lsp-ui icon indicating copy to clipboard operation
lsp-ui copied to clipboard

Show relative path in peek

Open finalpatch opened this issue 6 years ago • 5 comments

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 avatar Mar 27 '19 07:03 finalpatch

Or at least provide a customize option to show relative path

finalpatch avatar Mar 27 '19 07:03 finalpatch

are the files under the current project root?

yyoncho avatar Mar 30 '19 17:03 yyoncho

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

finalpatch avatar Mar 31 '19 07:03 finalpatch

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.

c02y avatar Jan 20 '22 20:01 c02y

Does someone has a solution for this?

tonicebrian avatar Jul 18 '23 13:07 tonicebrian