-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow copying paths from the File Tab context menu #15260
Allow copying paths from the File Tab context menu #15260
Conversation
…ane) NOTE: copy path is not absolute right now, need to find a way to copy absolute paths
Can you also post a screenshot please? |
Sure! Read only if you want to answerBtw, why is the target folder 16GB after compiling? And even if I change a line in I know rust projects are heavy, but this is too much for my laptop. I only started learning rust a few months ago and didn't expect this much from big projects 😂. Likewise, I plan to move zed repo to my external ssd to save space. Another thing, I am using stable zed to edit the files, which is a little unusable since cargo checks every crate upon a single edit, which slows down the zed, and my laptop. I need to disable checking while writing code. Thank god I didn't open it up in VSC |
Yeah, quite a pain
haha, same
Hmm, I think I have found an option in the settings.json for the rust language that disables this. |
These questions indeed belong to some #new-rustaceans generic channel, but let's do that once
This means you've compiled it too few times, you need to try a few more times, with different toolchain versions preferrably
cargo and rustc need various intermediate data for incremental compilation and build creation. Whenever something in the build chain diverges (a crate version, a rustc version, etc.) — whatever's affected by that change has to be recompiled, bringing in more artefacts, debug info, incremental info, etc.
pane.rs is a part of a quite foundational crate,
Realistically — using a different machine, either a remote one (Zed has some remote capabilities enough to work and it improves every month). Apart from that, you could install a different linker if you're on Linux (Zed CI uses Line 506 in 20213a7
After that — only some work on Zed's dependencies to reduce them, but not sure what are bottlenecks on your machine.
There are two things: your default settings save files very often, presumably after editor's focus is lost (which might be good by itself) — that triggers the default feature of rust-analyzer, "cargo check on save", which produces most of its diagnostics currently. So, either you could move into state of manual saves only, or tweak check on save (up to disabling it fully): https://zed.dev/docs/languages/rust#large-projects-and-performance |
… `worktree.absolutize()` add a new `paths` variable to include both relative and absolute paths in `pane.rs`, and use those paths in the context menu option.
Thanks very much for the help, Someone! rust-analzer options have been very helpful, I can now use intellisense (though a bit outdated), but it works! Now it's ready to merge. I may also create the PR to unify |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really liked the version from https://github.com/HarshNarayanJha/zed/blob/212605984629f8c9cc7019577bd14f497e4a85d1/crates/workspace/src/pane.rs more, now it's a bunch of questionable code added which is harder to read.
also re-create copy_relative_path into it's own function, while the menu entry itself handles copying absolute path (by the value from Pane::get_absolute_path)
Hope this helps! |
a343b5f
to
f91f856
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
I've pushed some style fixes as it seemed faster to do it myself than commenting.
Now it looks fine to merge.
…ed-industries#15260) Release Notes: - Added "Copy Path" and "Copy Relative Path" items into tab context menu ([zed-industries#13970](zed-industries#13970)) --------- Co-authored-by: Kirill Bulatov <[email protected]>
Why is this PR not in the latest release? |
Hello again. |
Pretty bare-bones implementation of copying paths from tab context menu.
Right now, both actions do the same thing (i.e. copy relative path), as I need to find a way to get the absolute pathFigured out!Release Notes: