zed/crates
Marshall Bowers 176f63e86e
Add ability to copy a permalink to a line (#7119)
This PR adds the ability to copy the permalink to a line from within
Zed.

This functionality is available through the `editor: copy permalink to
line` action in the command palette:

<img width="589" alt="Screenshot 2024-01-30 at 7 07 46 PM"
src="https://github.com/zed-industries/zed/assets/1486634/332282cb-211f-4f16-9eb1-415bcfee9b7b">

Executing this action will create a permalink to the currently selected
line(s) and copy it to the clipboard.

Here is an example line:

```
56c80e8011/src/lib.rs (L25)
```

Currently, both GitHub and GitLab are supported.

### Notes and known limitations

- In order to determine where to permalink to, we read the URL of the
`origin` remote in Git. This feature will not work if the `origin`
remote is not present.
- Attempting to permalink to a ref that is not pushed to the origin will
result in the link 404ing.
- Attempting to permalink when Git is in a dirty state may not generate
the right link.
- For instance, modifying a file (e.g., adding new lines) and grabbing a
permalink to it will result in incorrect line numbers.

Release Notes:

- Added the ability to copy a permalink to a line
([#6777](https://github.com/zed-industries/zed/issues/6777)).
- Available via the `editor: copy permalink to line` action in the
command palette.
2024-01-30 19:20:15 -05:00
..
activity_indicator Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
ai Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
assets Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
assistant Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
audio gpui: Add Global marker trait (#7095) 2024-01-30 14:08:20 -05:00
auto_update gpui: Add Global marker trait (#7095) 2024-01-30 14:08:20 -05:00
breadcrumbs Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
call gpui: Add Global marker trait (#7095) 2024-01-30 14:08:20 -05:00
channel Add ability to copy a permalink to a line (#7119) 2024-01-30 19:20:15 -05:00
cli Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
client Add ability to copy a permalink to a line (#7119) 2024-01-30 19:20:15 -05:00
clock Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
collab collab 0.43.0 2024-01-30 13:22:54 -07:00
collab_ui Improve mention visibility by adding a background color (#7014) 2024-01-30 09:58:36 -08:00
collections gpui: Add Global marker trait (#7095) 2024-01-30 14:08:20 -05:00
color Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535) 2024-01-27 13:51:16 +01:00
command_palette gpui: Add Global marker trait (#7095) 2024-01-30 14:08:20 -05:00
copilot gpui: Add Global marker trait (#7095) 2024-01-30 14:08:20 -05:00
copilot_ui Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
db gpui: Add Global marker trait (#7095) 2024-01-30 14:08:20 -05:00
diagnostics Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
editor Add ability to copy a permalink to a line (#7119) 2024-01-30 19:20:15 -05:00
feature_flags gpui: Add Global marker trait (#7095) 2024-01-30 14:08:20 -05:00
feedback gpui: Add Global marker trait (#7095) 2024-01-30 14:08:20 -05:00
file_finder Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
fs Add ability to copy a permalink to a line (#7119) 2024-01-30 19:20:15 -05:00
fsevent fix: isolate macos-specific dependencies (#6854) 2024-01-27 13:38:55 +01:00
fuzzy Fix panic in fuzzy-finder for unicode characters (#7080) 2024-01-30 16:10:35 +01:00
git Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
go_to_line Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
gpui Use fully-qualified name to avoid an unused import (#7104) 2024-01-30 14:57:54 -05:00
gpui_macros Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
install_cli Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
journal Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
language Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
language_selector Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
language_tools Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
live_kit_client Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
live_kit_server Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
lsp Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
media Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
menu Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
multi_buffer Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
node_runtime Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
notifications gpui: Add Global marker trait (#7095) 2024-01-30 14:08:20 -05:00
outline Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
picker Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
plugin Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
plugin_macros Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
plugin_runtime Fix two typos (#7056) 2024-01-30 10:17:06 +02:00
prettier Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
project Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
project_panel gpui: Add Global marker trait (#7095) 2024-01-30 14:08:20 -05:00
project_symbols Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
quick_action_bar Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
recent_projects Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
refineable Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
release_channel Fix per-env settings override (#7114) 2024-01-30 14:38:51 -07:00
rich_text Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
rope Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
rpc Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
search gpui: Add Global marker trait (#7095) 2024-01-30 14:08:20 -05:00
semantic_index gpui: Add Global marker trait (#7095) 2024-01-30 14:08:20 -05:00
settings gpui: Add Global marker trait (#7095) 2024-01-30 14:08:20 -05:00
snippet Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
sqlez Ensure sqlez build succeeds on Windows (#7072) 2024-01-30 10:07:46 -08:00
sqlez_macros Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
story Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
storybook Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
sum_tree Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
terminal Fix a spelling typo (#7059) 2024-01-30 11:40:33 +02:00
terminal_view Fix terminal line background being reset on each line (#7040) 2024-01-29 21:01:02 -08:00
text Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
theme gpui: Add Global marker trait (#7095) 2024-01-30 14:08:20 -05:00
theme_importer Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
theme_selector gpui: Add Global marker trait (#7095) 2024-01-30 14:08:20 -05:00
ui Rework loading images from files (#7088) 2024-01-30 11:26:02 -05:00
util Add ability to copy a permalink to a line (#7119) 2024-01-30 19:20:15 -05:00
vcs_menu Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
vim gpui: Add Global marker trait (#7095) 2024-01-30 14:08:20 -05:00
welcome Clean up Cargo.toml files (#7044) 2024-01-29 23:47:20 -05:00
workspace gpui: Add Global marker trait (#7095) 2024-01-30 14:08:20 -05:00
zed Add ability to copy a permalink to a line (#7119) 2024-01-30 19:20:15 -05:00
zed_actions Fix casing of OpenZedUrl action (#7045) 2024-01-29 23:50:31 -05:00