2021-02-20 20:02:34 +03:00
|
|
|
[workspace]
|
2022-10-25 20:31:58 +03:00
|
|
|
members = [
|
2024-02-16 05:54:43 +03:00
|
|
|
"crates/activity_indicator",
|
2024-04-01 00:57:57 +03:00
|
|
|
"crates/anthropic",
|
2024-02-16 05:54:43 +03:00
|
|
|
"crates/assets",
|
|
|
|
"crates/assistant",
|
|
|
|
"crates/audio",
|
|
|
|
"crates/auto_update",
|
|
|
|
"crates/breadcrumbs",
|
|
|
|
"crates/call",
|
|
|
|
"crates/channel",
|
|
|
|
"crates/cli",
|
|
|
|
"crates/client",
|
|
|
|
"crates/clock",
|
|
|
|
"crates/collab",
|
|
|
|
"crates/collab_ui",
|
|
|
|
"crates/collections",
|
|
|
|
"crates/command_palette",
|
2024-02-25 21:21:20 +03:00
|
|
|
"crates/command_palette_hooks",
|
2024-02-16 05:54:43 +03:00
|
|
|
"crates/copilot",
|
|
|
|
"crates/copilot_ui",
|
|
|
|
"crates/db",
|
|
|
|
"crates/diagnostics",
|
|
|
|
"crates/editor",
|
|
|
|
"crates/extension",
|
2024-03-02 03:00:55 +03:00
|
|
|
"crates/extension_api",
|
2024-03-19 17:50:21 +03:00
|
|
|
"crates/extension_cli",
|
2024-02-16 05:54:43 +03:00
|
|
|
"crates/extensions_ui",
|
|
|
|
"crates/feature_flags",
|
|
|
|
"crates/feedback",
|
|
|
|
"crates/file_finder",
|
2024-03-29 23:55:01 +03:00
|
|
|
"crates/file_icons",
|
2024-02-16 05:54:43 +03:00
|
|
|
"crates/fs",
|
|
|
|
"crates/fsevent",
|
|
|
|
"crates/fuzzy",
|
|
|
|
"crates/git",
|
|
|
|
"crates/go_to_line",
|
2024-03-19 21:22:26 +03:00
|
|
|
"crates/google_ai",
|
2024-02-16 05:54:43 +03:00
|
|
|
"crates/gpui",
|
|
|
|
"crates/gpui_macros",
|
2024-03-19 20:13:10 +03:00
|
|
|
"crates/image_viewer",
|
2024-02-16 05:54:43 +03:00
|
|
|
"crates/install_cli",
|
|
|
|
"crates/journal",
|
|
|
|
"crates/language",
|
|
|
|
"crates/language_selector",
|
|
|
|
"crates/language_tools",
|
2024-02-23 17:56:08 +03:00
|
|
|
"crates/languages",
|
2024-02-16 05:54:43 +03:00
|
|
|
"crates/live_kit_client",
|
|
|
|
"crates/live_kit_server",
|
|
|
|
"crates/lsp",
|
|
|
|
"crates/markdown_preview",
|
|
|
|
"crates/media",
|
|
|
|
"crates/menu",
|
|
|
|
"crates/multi_buffer",
|
|
|
|
"crates/node_runtime",
|
|
|
|
"crates/notifications",
|
2024-03-19 21:22:26 +03:00
|
|
|
"crates/open_ai",
|
2024-02-16 05:54:43 +03:00
|
|
|
"crates/outline",
|
|
|
|
"crates/picker",
|
|
|
|
"crates/prettier",
|
|
|
|
"crates/project",
|
|
|
|
"crates/project_panel",
|
|
|
|
"crates/project_symbols",
|
|
|
|
"crates/quick_action_bar",
|
|
|
|
"crates/recent_projects",
|
|
|
|
"crates/refineable",
|
|
|
|
"crates/refineable/derive_refineable",
|
|
|
|
"crates/release_channel",
|
|
|
|
"crates/rich_text",
|
|
|
|
"crates/rope",
|
|
|
|
"crates/rpc",
|
2024-02-21 15:56:43 +03:00
|
|
|
"crates/task",
|
|
|
|
"crates/tasks_ui",
|
2024-02-16 05:54:43 +03:00
|
|
|
"crates/search",
|
2024-03-29 19:11:57 +03:00
|
|
|
"crates/semantic_version",
|
2024-02-16 05:54:43 +03:00
|
|
|
"crates/settings",
|
|
|
|
"crates/snippet",
|
|
|
|
"crates/sqlez",
|
|
|
|
"crates/sqlez_macros",
|
|
|
|
"crates/story",
|
|
|
|
"crates/storybook",
|
|
|
|
"crates/sum_tree",
|
Add tab switcher (#7987)
The Tab Switcher implementation (#7653):
- `ctrl-tab` opens the Tab Switcher and moves selection to the
previously selcted tab. It also cycles selection forward.
- `ctrl-shift-tab` opens the Tab Switcher and moves selection to the
last tab in the list. It also cycles selection backward.
- Tab is selected and the Tab Switcher is closed on the shortcut
modifier key (`ctrl` by default) release.
- List items are in reverse activation history order.
- The list reacts to the item changes in background (new tab, tab
closed, tab title changed etc.)
Intentionally not in scope of this PR:
- File icons
- Close buttons
I will come back to these features. I think they need to be implemented
in separate PRs, and be synchronized with changes in how tabs are
rendered, to reuse the code as it's done in the current implementation.
The Tab Switcher looks usable even without them.
Known Issues:
Tab Switcher doesn't react to mouse click on a list item. It's not a tab
switcher specific problem, it looks like ctrl-clicks are not handled the
same way in Zed as cmd-clicks. For instance, menu items can be activated
with cmd-click, but don't react to ctrl-click. Since the Tab Switcher's
default keybinding is `ctrl-tab`, the user can only click an item with
`ctrl` pushed down, thus preventing `on_click()` from firing.
fixes #7653, #7321
Release Notes:
- Added Tab Switcher which is accessible via `ctrl-tab` and
`ctrl-shift-tab` (#7653) (#7321)
Related issues:
- Unblocks #7356, I hope 😄
How it looks and works (it's only `ctrl-tab`'s and `ctrl-shift-tab`'s,
no `enter`'s or mouse clicks):
https://github.com/zed-industries/zed/assets/2101250/4ad4ec6a-5314-481b-8b35-7ac85e43eb92
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2024-03-27 21:15:08 +03:00
|
|
|
"crates/tab_switcher",
|
2024-02-16 05:54:43 +03:00
|
|
|
"crates/terminal",
|
|
|
|
"crates/terminal_view",
|
|
|
|
"crates/text",
|
|
|
|
"crates/theme",
|
|
|
|
"crates/theme_importer",
|
|
|
|
"crates/theme_selector",
|
2024-02-23 19:13:28 +03:00
|
|
|
"crates/telemetry_events",
|
2024-02-24 05:18:06 +03:00
|
|
|
"crates/time_format",
|
2024-02-16 05:54:43 +03:00
|
|
|
"crates/ui",
|
2024-04-10 18:53:25 +03:00
|
|
|
"crates/ui_text_field",
|
2024-02-16 05:54:43 +03:00
|
|
|
"crates/util",
|
|
|
|
"crates/vcs_menu",
|
|
|
|
"crates/vim",
|
|
|
|
"crates/welcome",
|
|
|
|
"crates/workspace",
|
2024-03-11 21:35:27 +03:00
|
|
|
"crates/worktree",
|
2024-02-16 05:54:43 +03:00
|
|
|
"crates/zed",
|
|
|
|
"crates/zed_actions",
|
2024-03-09 01:18:06 +03:00
|
|
|
|
2024-03-27 01:50:08 +03:00
|
|
|
"extensions/astro",
|
2024-04-02 20:47:03 +03:00
|
|
|
"extensions/clojure",
|
2024-03-29 23:38:27 +03:00
|
|
|
"extensions/csharp",
|
2024-04-06 00:04:07 +03:00
|
|
|
"extensions/dart",
|
2024-04-11 20:23:49 +03:00
|
|
|
"extensions/elm",
|
2024-04-03 20:54:53 +03:00
|
|
|
"extensions/emmet",
|
2024-03-30 01:03:38 +03:00
|
|
|
"extensions/erlang",
|
2024-03-02 03:00:55 +03:00
|
|
|
"extensions/gleam",
|
2024-03-26 18:41:41 +03:00
|
|
|
"extensions/haskell",
|
2024-04-03 19:42:36 +03:00
|
|
|
"extensions/html",
|
2024-03-29 21:51:54 +03:00
|
|
|
"extensions/php",
|
2024-03-26 19:50:44 +03:00
|
|
|
"extensions/prisma",
|
2024-03-26 20:55:46 +03:00
|
|
|
"extensions/purescript",
|
2024-03-23 03:29:06 +03:00
|
|
|
"extensions/svelte",
|
2024-03-29 01:40:12 +03:00
|
|
|
"extensions/toml",
|
2024-03-26 19:50:44 +03:00
|
|
|
"extensions/uiua",
|
2024-03-28 03:56:30 +03:00
|
|
|
"extensions/zig",
|
2024-03-09 01:18:06 +03:00
|
|
|
|
2024-03-02 22:46:02 +03:00
|
|
|
"tooling/xtask",
|
2022-10-25 20:31:58 +03:00
|
|
|
]
|
2021-10-04 22:22:21 +03:00
|
|
|
default-members = ["crates/zed"]
|
2022-01-26 23:51:29 +03:00
|
|
|
resolver = "2"
|
2021-04-02 20:02:09 +03:00
|
|
|
|
2022-10-11 03:10:42 +03:00
|
|
|
[workspace.dependencies]
|
2024-02-06 22:41:36 +03:00
|
|
|
activity_indicator = { path = "crates/activity_indicator" }
|
|
|
|
ai = { path = "crates/ai" }
|
2024-04-01 00:57:57 +03:00
|
|
|
anthropic = { path = "crates/anthropic" }
|
2024-02-06 22:41:36 +03:00
|
|
|
assets = { path = "crates/assets" }
|
|
|
|
assistant = { path = "crates/assistant" }
|
|
|
|
audio = { path = "crates/audio" }
|
|
|
|
auto_update = { path = "crates/auto_update" }
|
2024-03-07 06:51:43 +03:00
|
|
|
base64 = "0.13"
|
2024-02-06 22:41:36 +03:00
|
|
|
breadcrumbs = { path = "crates/breadcrumbs" }
|
|
|
|
call = { path = "crates/call" }
|
|
|
|
channel = { path = "crates/channel" }
|
|
|
|
cli = { path = "crates/cli" }
|
|
|
|
client = { path = "crates/client" }
|
|
|
|
clock = { path = "crates/clock" }
|
|
|
|
collab = { path = "crates/collab" }
|
|
|
|
collab_ui = { path = "crates/collab_ui" }
|
|
|
|
collections = { path = "crates/collections" }
|
|
|
|
color = { path = "crates/color" }
|
|
|
|
command_palette = { path = "crates/command_palette" }
|
2024-02-25 21:21:20 +03:00
|
|
|
command_palette_hooks = { path = "crates/command_palette_hooks" }
|
2024-02-06 22:41:36 +03:00
|
|
|
copilot = { path = "crates/copilot" }
|
|
|
|
copilot_ui = { path = "crates/copilot_ui" }
|
|
|
|
db = { path = "crates/db" }
|
|
|
|
diagnostics = { path = "crates/diagnostics" }
|
|
|
|
editor = { path = "crates/editor" }
|
2024-02-07 23:14:50 +03:00
|
|
|
extension = { path = "crates/extension" }
|
2024-02-13 22:09:02 +03:00
|
|
|
extensions_ui = { path = "crates/extensions_ui" }
|
2024-02-06 22:41:36 +03:00
|
|
|
feature_flags = { path = "crates/feature_flags" }
|
|
|
|
feedback = { path = "crates/feedback" }
|
|
|
|
file_finder = { path = "crates/file_finder" }
|
2024-03-29 23:55:01 +03:00
|
|
|
file_icons = { path = "crates/file_icons" }
|
2024-02-06 22:41:36 +03:00
|
|
|
fs = { path = "crates/fs" }
|
|
|
|
fsevent = { path = "crates/fsevent" }
|
|
|
|
fuzzy = { path = "crates/fuzzy" }
|
|
|
|
git = { path = "crates/git" }
|
|
|
|
go_to_line = { path = "crates/go_to_line" }
|
2024-03-19 21:22:26 +03:00
|
|
|
google_ai = { path = "crates/google_ai" }
|
2024-02-06 22:41:36 +03:00
|
|
|
gpui = { path = "crates/gpui" }
|
|
|
|
gpui_macros = { path = "crates/gpui_macros" }
|
|
|
|
install_cli = { path = "crates/install_cli" }
|
2024-03-19 20:13:10 +03:00
|
|
|
image_viewer = { path = "crates/image_viewer" }
|
2024-02-06 22:41:36 +03:00
|
|
|
journal = { path = "crates/journal" }
|
|
|
|
language = { path = "crates/language" }
|
|
|
|
language_selector = { path = "crates/language_selector" }
|
|
|
|
language_tools = { path = "crates/language_tools" }
|
2024-02-25 20:02:59 +03:00
|
|
|
languages = { path = "crates/languages" }
|
2024-02-06 22:41:36 +03:00
|
|
|
live_kit_client = { path = "crates/live_kit_client" }
|
|
|
|
live_kit_server = { path = "crates/live_kit_server" }
|
|
|
|
lsp = { path = "crates/lsp" }
|
|
|
|
markdown_preview = { path = "crates/markdown_preview" }
|
|
|
|
media = { path = "crates/media" }
|
|
|
|
menu = { path = "crates/menu" }
|
|
|
|
multi_buffer = { path = "crates/multi_buffer" }
|
|
|
|
node_runtime = { path = "crates/node_runtime" }
|
|
|
|
notifications = { path = "crates/notifications" }
|
2024-03-19 21:22:26 +03:00
|
|
|
open_ai = { path = "crates/open_ai" }
|
2024-02-06 22:41:36 +03:00
|
|
|
outline = { path = "crates/outline" }
|
|
|
|
picker = { path = "crates/picker" }
|
|
|
|
plugin = { path = "crates/plugin" }
|
|
|
|
plugin_macros = { path = "crates/plugin_macros" }
|
|
|
|
prettier = { path = "crates/prettier" }
|
|
|
|
project = { path = "crates/project" }
|
2024-03-11 21:35:27 +03:00
|
|
|
worktree = { path = "crates/worktree" }
|
2024-02-06 22:41:36 +03:00
|
|
|
project_panel = { path = "crates/project_panel" }
|
|
|
|
project_symbols = { path = "crates/project_symbols" }
|
|
|
|
quick_action_bar = { path = "crates/quick_action_bar" }
|
|
|
|
recent_projects = { path = "crates/recent_projects" }
|
|
|
|
release_channel = { path = "crates/release_channel" }
|
|
|
|
rich_text = { path = "crates/rich_text" }
|
|
|
|
rope = { path = "crates/rope" }
|
|
|
|
rpc = { path = "crates/rpc" }
|
2024-02-21 15:56:43 +03:00
|
|
|
task = { path = "crates/task" }
|
|
|
|
tasks_ui = { path = "crates/tasks_ui" }
|
2024-02-06 22:41:36 +03:00
|
|
|
search = { path = "crates/search" }
|
2024-03-29 19:11:57 +03:00
|
|
|
semantic_version = { path = "crates/semantic_version" }
|
2024-02-06 22:41:36 +03:00
|
|
|
settings = { path = "crates/settings" }
|
|
|
|
snippet = { path = "crates/snippet" }
|
|
|
|
sqlez = { path = "crates/sqlez" }
|
|
|
|
sqlez_macros = { path = "crates/sqlez_macros" }
|
|
|
|
story = { path = "crates/story" }
|
|
|
|
storybook = { path = "crates/storybook" }
|
|
|
|
sum_tree = { path = "crates/sum_tree" }
|
Add tab switcher (#7987)
The Tab Switcher implementation (#7653):
- `ctrl-tab` opens the Tab Switcher and moves selection to the
previously selcted tab. It also cycles selection forward.
- `ctrl-shift-tab` opens the Tab Switcher and moves selection to the
last tab in the list. It also cycles selection backward.
- Tab is selected and the Tab Switcher is closed on the shortcut
modifier key (`ctrl` by default) release.
- List items are in reverse activation history order.
- The list reacts to the item changes in background (new tab, tab
closed, tab title changed etc.)
Intentionally not in scope of this PR:
- File icons
- Close buttons
I will come back to these features. I think they need to be implemented
in separate PRs, and be synchronized with changes in how tabs are
rendered, to reuse the code as it's done in the current implementation.
The Tab Switcher looks usable even without them.
Known Issues:
Tab Switcher doesn't react to mouse click on a list item. It's not a tab
switcher specific problem, it looks like ctrl-clicks are not handled the
same way in Zed as cmd-clicks. For instance, menu items can be activated
with cmd-click, but don't react to ctrl-click. Since the Tab Switcher's
default keybinding is `ctrl-tab`, the user can only click an item with
`ctrl` pushed down, thus preventing `on_click()` from firing.
fixes #7653, #7321
Release Notes:
- Added Tab Switcher which is accessible via `ctrl-tab` and
`ctrl-shift-tab` (#7653) (#7321)
Related issues:
- Unblocks #7356, I hope 😄
How it looks and works (it's only `ctrl-tab`'s and `ctrl-shift-tab`'s,
no `enter`'s or mouse clicks):
https://github.com/zed-industries/zed/assets/2101250/4ad4ec6a-5314-481b-8b35-7ac85e43eb92
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2024-03-27 21:15:08 +03:00
|
|
|
tab_switcher = { path = "crates/tab_switcher" }
|
2024-02-06 22:41:36 +03:00
|
|
|
terminal = { path = "crates/terminal" }
|
|
|
|
terminal_view = { path = "crates/terminal_view" }
|
|
|
|
text = { path = "crates/text" }
|
|
|
|
theme = { path = "crates/theme" }
|
|
|
|
theme_importer = { path = "crates/theme_importer" }
|
|
|
|
theme_selector = { path = "crates/theme_selector" }
|
2024-02-24 05:18:06 +03:00
|
|
|
telemetry_events = { path = "crates/telemetry_events" }
|
|
|
|
time_format = { path = "crates/time_format" }
|
2024-02-06 22:41:36 +03:00
|
|
|
ui = { path = "crates/ui" }
|
2024-04-10 18:53:25 +03:00
|
|
|
ui_text_field = { path = "crates/ui_text_field" }
|
2024-02-06 22:41:36 +03:00
|
|
|
util = { path = "crates/util" }
|
|
|
|
vcs_menu = { path = "crates/vcs_menu" }
|
|
|
|
vim = { path = "crates/vim" }
|
|
|
|
welcome = { path = "crates/welcome" }
|
|
|
|
workspace = { path = "crates/workspace" }
|
|
|
|
zed = { path = "crates/zed" }
|
|
|
|
zed_actions = { path = "crates/zed_actions" }
|
|
|
|
|
2024-01-31 05:41:29 +03:00
|
|
|
anyhow = "1.0.57"
|
2024-04-03 13:21:17 +03:00
|
|
|
any_vec = "0.13"
|
2024-01-27 04:22:31 +03:00
|
|
|
async-compression = { version = "0.4", features = ["gzip", "futures-io"] }
|
2024-03-13 02:37:10 +03:00
|
|
|
async-fs = "1.6"
|
2024-03-12 13:54:12 +03:00
|
|
|
async-recursion = "1.0.0"
|
2024-02-13 22:09:02 +03:00
|
|
|
async-tar = "0.4.2"
|
2024-01-31 05:41:29 +03:00
|
|
|
async-trait = "0.1"
|
2024-03-02 05:07:39 +03:00
|
|
|
bitflags = "2.4.2"
|
2024-04-10 03:16:35 +03:00
|
|
|
blade-graphics = { git = "https://github.com/kvark/blade", rev = "810ec594358aafea29a4a3d8ab601d25292b2ce4" }
|
|
|
|
blade-macros = { git = "https://github.com/kvark/blade", rev = "810ec594358aafea29a4a3d8ab601d25292b2ce4" }
|
2024-02-17 00:39:40 +03:00
|
|
|
blade-rwh = { package = "raw-window-handle", version = "0.5" }
|
2024-03-23 03:29:06 +03:00
|
|
|
cap-std = "3.0"
|
2024-01-23 00:11:24 +03:00
|
|
|
chrono = { version = "0.4", features = ["serde"] }
|
2024-03-18 22:00:37 +03:00
|
|
|
clap = { version = "4.4", features = ["derive"] }
|
2024-02-23 19:13:28 +03:00
|
|
|
clickhouse = { version = "0.11.6" }
|
2024-01-05 20:08:41 +03:00
|
|
|
ctor = "0.2.6"
|
2024-02-24 05:18:06 +03:00
|
|
|
core-foundation = { version = "0.9.3" }
|
|
|
|
core-foundation-sys = "0.8.6"
|
2024-01-31 05:41:29 +03:00
|
|
|
derive_more = "0.99.17"
|
2024-03-07 05:18:29 +03:00
|
|
|
emojis = "0.6.1"
|
2024-01-31 05:41:29 +03:00
|
|
|
env_logger = "0.9"
|
|
|
|
futures = "0.3"
|
2024-03-13 02:37:10 +03:00
|
|
|
futures-lite = "1.13"
|
2024-02-02 17:58:07 +03:00
|
|
|
git2 = { version = "0.15", default-features = false }
|
2024-01-31 05:41:29 +03:00
|
|
|
globset = "0.4"
|
2024-02-23 19:13:28 +03:00
|
|
|
hex = "0.4.3"
|
2024-02-27 00:09:22 +03:00
|
|
|
ignore = "0.4.22"
|
2023-05-23 08:11:22 +03:00
|
|
|
indoc = "1"
|
2024-02-26 04:37:52 +03:00
|
|
|
# We explicitly disable http2 support in isahc.
|
2024-03-06 23:48:43 +03:00
|
|
|
isahc = { version = "1.7.2", default-features = false, features = [
|
|
|
|
"static-curl",
|
|
|
|
"text-decoding",
|
|
|
|
] }
|
2024-02-26 04:37:52 +03:00
|
|
|
itertools = "0.11.0"
|
2024-01-31 05:41:29 +03:00
|
|
|
lazy_static = "1.4.0"
|
2024-02-20 07:49:47 +03:00
|
|
|
linkify = "0.10.0"
|
2023-04-25 03:41:55 +03:00
|
|
|
log = { version = "0.4.16", features = ["kv_unstable_serde"] }
|
2024-01-31 05:41:29 +03:00
|
|
|
ordered-float = "2.1.1"
|
2024-02-28 00:29:27 +03:00
|
|
|
palette = { version = "0.7.5", default-features = false, features = ["std"] }
|
2024-03-13 02:10:49 +03:00
|
|
|
parking_lot = "0.12.1"
|
2024-02-22 21:59:52 +03:00
|
|
|
profiling = "1"
|
2023-04-25 03:41:55 +03:00
|
|
|
postage = { version = "0.5", features = ["futures-traits"] }
|
2024-01-31 05:41:29 +03:00
|
|
|
pretty_assertions = "1.3.0"
|
2024-03-19 05:33:20 +03:00
|
|
|
prost = "0.9"
|
|
|
|
prost-build = "0.9"
|
|
|
|
prost-types = "0.9"
|
2024-02-26 22:04:48 +03:00
|
|
|
pulldown-cmark = { version = "0.10.0", default-features = false }
|
2024-01-31 05:41:29 +03:00
|
|
|
rand = "0.8.5"
|
2023-08-18 10:03:46 +03:00
|
|
|
refineable = { path = "./crates/refineable" }
|
2024-01-31 05:41:29 +03:00
|
|
|
regex = "1.5"
|
2023-10-03 22:16:53 +03:00
|
|
|
rusqlite = { version = "0.29.0", features = ["blob", "array", "modern_sqlite"] }
|
2024-01-31 05:41:29 +03:00
|
|
|
rust-embed = { version = "8.0", features = ["include-exclude"] }
|
|
|
|
schemars = "0.8"
|
2024-02-16 05:54:43 +03:00
|
|
|
semver = "1.0"
|
2022-10-11 03:10:42 +03:00
|
|
|
serde = { version = "1.0", features = ["derive", "rc"] }
|
2023-03-17 17:39:24 +03:00
|
|
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
2022-10-11 03:10:42 +03:00
|
|
|
serde_json = { version = "1.0", features = ["preserve_order", "raw_value"] }
|
2024-03-06 23:48:43 +03:00
|
|
|
serde_json_lenient = { version = "0.1", features = [
|
|
|
|
"preserve_order",
|
|
|
|
"raw_value",
|
|
|
|
] }
|
2024-01-27 06:40:31 +03:00
|
|
|
serde_repr = "0.1"
|
2024-02-23 19:13:28 +03:00
|
|
|
sha2 = "0.10"
|
2024-02-25 20:02:59 +03:00
|
|
|
shellexpand = "2.1.0"
|
2023-04-20 10:11:45 +03:00
|
|
|
smallvec = { version = "1.6", features = ["union"] }
|
2024-01-31 05:41:29 +03:00
|
|
|
smol = "1.2"
|
2023-10-05 00:16:32 +03:00
|
|
|
strum = { version = "0.25.0", features = ["derive"] }
|
2024-03-07 06:51:43 +03:00
|
|
|
subtle = "2.5.0"
|
2024-03-12 22:27:40 +03:00
|
|
|
sysinfo = "0.30.7"
|
2024-01-31 05:41:29 +03:00
|
|
|
tempfile = "3.9.0"
|
|
|
|
thiserror = "1.0.29"
|
2023-11-14 17:12:25 +03:00
|
|
|
tiktoken-rs = "0.5.7"
|
2024-03-06 23:48:43 +03:00
|
|
|
time = { version = "0.3", features = [
|
Add `git blame` (#8889)
This adds a new action to the editor: `editor: toggle git blame`. When
used it turns on a sidebar containing `git blame` information for the
currently open buffer.
The git blame information is updated when the buffer changes. It handles
additions, deletions, modifications, changes to the underlying git data
(new commits, changed commits, ...), file saves. It also handles folding
and wrapping lines correctly.
When the user hovers over a commit, a tooltip displays information for
the commit that introduced the line. If the repository has a remote with
the name `origin` configured, then clicking on a blame entry opens the
permalink to the commit on the code host.
Users can right-click on a blame entry to get a context menu which
allows them to copy the SHA of the commit.
The feature also works on shared projects, e.g. when collaborating a
peer can request `git blame` data.
As of this PR, Zed now comes bundled with a `git` binary so that users
don't have to have `git` installed locally to use this feature.
### Screenshots
![screenshot-2024-03-28-13 57
43@2x](https://github.com/zed-industries/zed/assets/1185253/ee8ec55d-3b5e-4d63-a85a-852da914f5ba)
![screenshot-2024-03-28-14 01
23@2x](https://github.com/zed-industries/zed/assets/1185253/2ba8efd7-e887-4076-a87a-587a732b9e9a)
![screenshot-2024-03-28-14 01
32@2x](https://github.com/zed-industries/zed/assets/1185253/496f4a06-b189-4881-b427-2289ae6e6075)
### TODOs
- [x] Bundling `git` binary
### Release Notes
Release Notes:
- Added `editor: toggle git blame` command that toggles a sidebar with
git blame information for the current buffer.
---------
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Piotr <piotr@zed.dev>
Co-authored-by: Bennet <bennetbo@gmx.de>
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-03-28 20:32:11 +03:00
|
|
|
"macros",
|
|
|
|
"parsing",
|
2024-03-06 23:48:43 +03:00
|
|
|
"serde",
|
|
|
|
"serde-well-known",
|
|
|
|
"formatting",
|
|
|
|
] }
|
2024-02-17 01:43:40 +03:00
|
|
|
toml = "0.8"
|
2024-03-19 17:50:21 +03:00
|
|
|
tokio = { version = "1", features = ["full"] }
|
2024-02-23 22:50:06 +03:00
|
|
|
tower-http = "0.4.4"
|
2024-02-25 11:35:19 +03:00
|
|
|
tree-sitter = { version = "0.20", features = ["wasm"] }
|
2023-10-24 10:16:06 +03:00
|
|
|
tree-sitter-bash = { git = "https://github.com/tree-sitter/tree-sitter-bash", rev = "7331995b19b8f8aba2d5e26deb51d2195c18bc94" }
|
2023-07-14 04:09:32 +03:00
|
|
|
tree-sitter-c = "0.20.1"
|
2024-02-02 17:58:07 +03:00
|
|
|
tree-sitter-cpp = { git = "https://github.com/tree-sitter/tree-sitter-cpp", rev = "f44509141e7e483323d2ec178f2d2e6c0fc041c1" }
|
2023-07-14 04:09:32 +03:00
|
|
|
tree-sitter-css = { git = "https://github.com/tree-sitter/tree-sitter-css", rev = "769203d0f9abe1a9a691ac2b9fe4bb4397a73c51" }
|
2023-07-28 03:41:13 +03:00
|
|
|
tree-sitter-elixir = { git = "https://github.com/elixir-lang/tree-sitter-elixir", rev = "a2861e88a730287a60c11ea9299c033c7d076e30" }
|
2023-07-14 04:09:32 +03:00
|
|
|
tree-sitter-embedded-template = "0.20.0"
|
|
|
|
tree-sitter-go = { git = "https://github.com/tree-sitter/tree-sitter-go", rev = "aeb2f33b366fd78d5789ff104956ce23508b85db" }
|
2024-01-31 10:46:13 +03:00
|
|
|
tree-sitter-gomod = { git = "https://github.com/camdencheek/tree-sitter-go-mod" }
|
2024-01-31 22:11:03 +03:00
|
|
|
tree-sitter-gowork = { git = "https://github.com/d1y/tree-sitter-go-work" }
|
2024-02-06 22:41:36 +03:00
|
|
|
tree-sitter-hcl = { git = "https://github.com/MichaHoffmann/tree-sitter-hcl", rev = "v1.1.0" }
|
2024-03-01 23:23:44 +03:00
|
|
|
rustc-demangle = "0.1.23"
|
2023-07-14 04:09:32 +03:00
|
|
|
tree-sitter-heex = { git = "https://github.com/phoenixframework/tree-sitter-heex", rev = "2e1348c3cf2c9323e87c2744796cf3f3868aa82a" }
|
2024-01-31 05:41:29 +03:00
|
|
|
tree-sitter-html = "0.19.0"
|
2024-03-16 00:17:06 +03:00
|
|
|
tree-sitter-jsdoc = { git = "https://github.com/tree-sitter/tree-sitter-jsdoc", ref = "6a6cf9e7341af32d8e2b2e24a37fbfebefc3dc55" }
|
2024-02-25 11:35:19 +03:00
|
|
|
tree-sitter-json = { git = "https://github.com/tree-sitter/tree-sitter-json", rev = "40a81c01a40ac48744e0c8ccabbaba1920441199" }
|
2024-01-31 05:41:29 +03:00
|
|
|
tree-sitter-lua = "0.0.14"
|
2023-07-14 04:09:32 +03:00
|
|
|
tree-sitter-markdown = { git = "https://github.com/MDeiml/tree-sitter-markdown", rev = "330ecab87a3e3a7211ac69bbadc19eabecdb1cca" }
|
2024-01-31 05:41:29 +03:00
|
|
|
tree-sitter-nix = { git = "https://github.com/nix-community/tree-sitter-nix", rev = "66e3e9ce9180ae08fc57372061006ef83f0abde7" }
|
2024-02-20 20:05:09 +03:00
|
|
|
tree-sitter-nu = { git = "https://github.com/nushell/tree-sitter-nu", rev = "7dd29f9616822e5fc259f5b4ae6c4ded9a71a132" }
|
2024-02-02 17:58:07 +03:00
|
|
|
tree-sitter-ocaml = { git = "https://github.com/tree-sitter/tree-sitter-ocaml", rev = "4abfdc1c7af2c6c77a370aee974627be1c285b3b" }
|
|
|
|
tree-sitter-proto = { git = "https://github.com/rewinfrey/tree-sitter-proto", rev = "36d54f288aee112f13a67b550ad32634d0c2cb52" }
|
2023-07-14 04:09:32 +03:00
|
|
|
tree-sitter-python = "0.20.2"
|
2024-01-31 05:41:29 +03:00
|
|
|
tree-sitter-racket = { git = "https://github.com/zed-industries/tree-sitter-racket", rev = "eb010cf2c674c6fd9a6316a84e28ef90190fe51a" }
|
2024-03-18 18:49:01 +03:00
|
|
|
tree-sitter-regex = "0.20.0"
|
2023-07-14 04:09:32 +03:00
|
|
|
tree-sitter-ruby = "0.20.0"
|
2024-01-31 05:41:29 +03:00
|
|
|
tree-sitter-rust = "0.20.3"
|
2024-01-28 01:13:23 +03:00
|
|
|
tree-sitter-scheme = { git = "https://github.com/6cdh/tree-sitter-scheme", rev = "af0fd1fa452cb2562dc7b5c8a8c55551c39273b9" }
|
2024-01-31 05:41:29 +03:00
|
|
|
tree-sitter-typescript = { git = "https://github.com/tree-sitter/tree-sitter-typescript", rev = "5d20856f34315b068c41edaee2ac8a100081d259" }
|
|
|
|
tree-sitter-vue = { git = "https://github.com/zed-industries/tree-sitter-vue", rev = "6608d9d60c386f19d80af7d8132322fa11199c42" }
|
|
|
|
tree-sitter-yaml = { git = "https://github.com/zed-industries/tree-sitter-yaml", rev = "f545a41f57502e1b5ddf2a6668896c1b0620f930" }
|
|
|
|
unindent = "0.1.7"
|
2024-02-28 12:03:34 +03:00
|
|
|
unicase = "2.6"
|
Fix caret movement issue for some special characters (#10198)
Currently in Zed, certain characters require pressing the key twice to
move the caret through that character. For example: "❤️" and "y̆".
The reason for this is as follows:
Currently, Zed uses `chars` to distinguish different characters, and
calling `chars` on `y̆` will yield two `char` values: `y` and `\u{306}`,
and calling `chars` on `❤️` will yield two `char` values: `❤` and
`\u{fe0f}`.
Therefore, consider the following scenario (where ^ represents the
caret):
- what we see: ❤️ ^
- the actual buffer: ❤ \u{fe0f} ^
After pressing the left arrow key once:
- what we see: ❤️ ^
- the actual buffer: ❤ ^ \u{fe0f}
After pressing the left arrow key again:
- what we see: ^ ❤️
- the actual buffer: ^ ❤ \u{fe0f}
Thus, two left arrow key presses are needed to move the caret, and this
PR fixes this bug (or this is actually a feature?).
I have tried to keep the scope of code modifications as minimal as
possible. In this PR, Zed handles such characters as follows:
- what we see: ❤️ ^
- the actual buffer: ❤ \u{fe0f} ^
After pressing the left arrow key once:
- what we see: ^ ❤️
- the actual buffer: ^ ❤ \u{fe0f}
Or after pressing the delete key:
- what we see: ^
- the actual buffer: ^
Please note that currently, different platforms and software handle
these special characters differently, and even the same software may
handle these characters differently in different situations. For
example, in my testing on Chrome on macOS, GitHub treats `y̆` as a
single character, just like in this PR; however, in Rust Playground,
`y̆` is treated as two characters, and pressing the delete key does not
delete the entire `y̆` character, but instead deletes `\u{306}` to yield
the character `y`. And they both treat `❤️` as a single character,
pressing the delete key will delete the entire `❤️` character.
This PR is based on the principle of making changes with the smallest
impact on the code, and I think that deleting the entire character with
the delete key is more intuitive.
Release Notes:
- Fix caret movement issue for some special characters
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Thorsten <thorsten@zed.dev>
Co-authored-by: Bennet <bennetbo@gmx.de>
2024-04-10 22:01:25 +03:00
|
|
|
unicode-segmentation = "1.10"
|
2024-01-31 05:41:29 +03:00
|
|
|
url = "2.2"
|
|
|
|
uuid = { version = "1.1.2", features = ["v4"] }
|
2024-03-23 03:29:06 +03:00
|
|
|
wasmparser = "0.201"
|
|
|
|
wasm-encoder = "0.201"
|
|
|
|
wasmtime = { version = "19.0.0", default-features = false, features = [
|
windows: Better keyboard input support (#9180)
### Description
Currently, there are some issues with input handling on Windows:
#### 1. Direct crash when encountering IME input.
https://github.com/zed-industries/zed/assets/14981363/598f7272-1948-4a42-99c5-2ef7b9162a1e
#### 2. Handling messages every 1/60 seconds in the main thread. Despite
being named "immediate_handle," it's not exactly immediate.
```rust
// actually halt here
let wait_result =
unsafe { DCompositionWaitForCompositorClock(Some(&[self.inner.event]), INFINITE) };
// compositor clock ticked so we should draw a frame
if wait_result == 1 {
unsafe { invalidate_thread_windows(GetCurrentThreadId()) };
while unsafe { PeekMessageW(&mut msg, HWND::default(), 0, 0, PM_REMOVE) }.as_bool()
```
#### 3. According to Windows recommendations, character input should be
obtained using `WM_CHAR` instead of `WM_KEYDOWN`. Additionally, there
are problems with the handling within `WM_CHAR`.
```rust
fn handle_char_msg(&self, wparam: WPARAM) -> LRESULT {
let mut callbacks = self.callbacks.borrow_mut();
if let Some(callback) = callbacks.input.as_mut() {
let modifiers = self.current_modifiers();
let msg_char = wparam.0 as u8 as char; // these are u16 chars, cant treat them as u8
```
And, we don't handle `WM_SYSKEYDOWN` properly, which leads to `Alt + F4`
not working.
Release Notes:
- N/A
2024-03-13 22:10:22 +03:00
|
|
|
"async",
|
|
|
|
"demangle",
|
|
|
|
"runtime",
|
|
|
|
"cranelift",
|
|
|
|
"component-model",
|
|
|
|
] }
|
2024-03-23 03:29:06 +03:00
|
|
|
wasmtime-wasi = "19.0.0"
|
Detect and possibly use user-installed `gopls` / `zls` language servers (#8188)
After a lot of back-and-forth, this is a small attempt to implement
solutions (1) and (3) in
https://github.com/zed-industries/zed/issues/7902. The goal is to have a
minimal change that helps users get started with Zed, until we have
extensions ready.
Release Notes:
- Added detection of user-installed `gopls` to Go language server
adapter. If a user has `gopls` in `$PATH` when opening a worktree, it
will be used.
- Added detection of user-installed `zls` to Zig language server
adapter. If a user has `zls` in `$PATH` when opening a worktree, it will
be used.
Example:
I don't have `go` installed globally, but I do have `gopls`:
```
~ $ which go
go not found
~ $ which gopls
/Users/thorstenball/code/go/bin/gopls
```
But I do have `go` in a project's directory:
```
~/tmp/go-testing φ which go
/Users/thorstenball/.local/share/mise/installs/go/1.21.5/go/bin/go
~/tmp/go-testing φ which gopls
/Users/thorstenball/code/go/bin/gopls
```
With current Zed when I run `zed ~/tmp/go-testing`, I'd get the dreaded
error:
![screenshot-2024-02-23-11 14
08@2x](https://github.com/zed-industries/zed/assets/1185253/822ea59b-c63e-4102-a50e-75501cc4e0e3)
But with the changes in this PR, it works:
```
[2024-02-23T11:14:42+01:00 INFO language::language_registry] starting language server "gopls", path: "/Users/thorstenball/tmp/go-testing", id: 1
[2024-02-23T11:14:42+01:00 INFO language::language_registry] found user-installed language server for Go. path: "/Users/thorstenball/code/go/bin/gopls", arguments: ["-mode=stdio"]
[2024-02-23T11:14:42+01:00 INFO lsp] starting language server. binary path: "/Users/thorstenball/code/go/bin/gopls", working directory: "/Users/thorstenball/tmp/go-testing", args: ["-mode=stdio"]
```
---------
Co-authored-by: Antonio <antonio@zed.dev>
2024-02-23 15:39:14 +03:00
|
|
|
which = "6.0.0"
|
2024-03-23 03:29:06 +03:00
|
|
|
wit-component = "0.201"
|
2024-02-17 18:44:28 +03:00
|
|
|
sys-locale = "0.3.1"
|
2023-11-28 00:16:50 +03:00
|
|
|
|
2024-03-03 22:58:31 +03:00
|
|
|
[workspace.dependencies.windows]
|
|
|
|
version = "0.53.0"
|
|
|
|
features = [
|
2024-03-08 02:59:48 +03:00
|
|
|
"implement",
|
2024-03-06 23:48:43 +03:00
|
|
|
"Wdk_System_SystemServices",
|
2024-03-15 01:29:25 +03:00
|
|
|
"Win32_Globalization",
|
2024-03-15 20:40:58 +03:00
|
|
|
"Win32_Graphics_DirectWrite",
|
2024-03-16 03:17:26 +03:00
|
|
|
"Win32_Graphics_Gdi",
|
|
|
|
"Win32_Media",
|
2024-03-03 22:58:31 +03:00
|
|
|
"Win32_Security",
|
2024-03-18 20:16:29 +03:00
|
|
|
"Win32_Security_Credentials",
|
2024-03-14 20:43:06 +03:00
|
|
|
"Win32_Storage_FileSystem",
|
2024-03-19 22:40:57 +03:00
|
|
|
"Win32_System_LibraryLoader",
|
2024-03-08 02:59:48 +03:00
|
|
|
"Win32_System_Com",
|
|
|
|
"Win32_System_Com_StructuredStorage",
|
2024-03-05 19:35:07 +03:00
|
|
|
"Win32_System_DataExchange",
|
2024-03-16 03:17:26 +03:00
|
|
|
"Win32_System_LibraryLoader",
|
2024-03-05 19:35:07 +03:00
|
|
|
"Win32_System_Ole",
|
windows: Better keyboard input support (#9180)
### Description
Currently, there are some issues with input handling on Windows:
#### 1. Direct crash when encountering IME input.
https://github.com/zed-industries/zed/assets/14981363/598f7272-1948-4a42-99c5-2ef7b9162a1e
#### 2. Handling messages every 1/60 seconds in the main thread. Despite
being named "immediate_handle," it's not exactly immediate.
```rust
// actually halt here
let wait_result =
unsafe { DCompositionWaitForCompositorClock(Some(&[self.inner.event]), INFINITE) };
// compositor clock ticked so we should draw a frame
if wait_result == 1 {
unsafe { invalidate_thread_windows(GetCurrentThreadId()) };
while unsafe { PeekMessageW(&mut msg, HWND::default(), 0, 0, PM_REMOVE) }.as_bool()
```
#### 3. According to Windows recommendations, character input should be
obtained using `WM_CHAR` instead of `WM_KEYDOWN`. Additionally, there
are problems with the handling within `WM_CHAR`.
```rust
fn handle_char_msg(&self, wparam: WPARAM) -> LRESULT {
let mut callbacks = self.callbacks.borrow_mut();
if let Some(callback) = callbacks.input.as_mut() {
let modifiers = self.current_modifiers();
let msg_char = wparam.0 as u8 as char; // these are u16 chars, cant treat them as u8
```
And, we don't handle `WM_SYSKEYDOWN` properly, which leads to `Alt + F4`
not working.
Release Notes:
- N/A
2024-03-13 22:10:22 +03:00
|
|
|
"Win32_System_SystemInformation",
|
|
|
|
"Win32_System_SystemServices",
|
|
|
|
"Win32_System_Threading",
|
2024-03-16 03:17:26 +03:00
|
|
|
"Win32_System_Time",
|
windows: Better keyboard input support (#9180)
### Description
Currently, there are some issues with input handling on Windows:
#### 1. Direct crash when encountering IME input.
https://github.com/zed-industries/zed/assets/14981363/598f7272-1948-4a42-99c5-2ef7b9162a1e
#### 2. Handling messages every 1/60 seconds in the main thread. Despite
being named "immediate_handle," it's not exactly immediate.
```rust
// actually halt here
let wait_result =
unsafe { DCompositionWaitForCompositorClock(Some(&[self.inner.event]), INFINITE) };
// compositor clock ticked so we should draw a frame
if wait_result == 1 {
unsafe { invalidate_thread_windows(GetCurrentThreadId()) };
while unsafe { PeekMessageW(&mut msg, HWND::default(), 0, 0, PM_REMOVE) }.as_bool()
```
#### 3. According to Windows recommendations, character input should be
obtained using `WM_CHAR` instead of `WM_KEYDOWN`. Additionally, there
are problems with the handling within `WM_CHAR`.
```rust
fn handle_char_msg(&self, wparam: WPARAM) -> LRESULT {
let mut callbacks = self.callbacks.borrow_mut();
if let Some(callback) = callbacks.input.as_mut() {
let modifiers = self.current_modifiers();
let msg_char = wparam.0 as u8 as char; // these are u16 chars, cant treat them as u8
```
And, we don't handle `WM_SYSKEYDOWN` properly, which leads to `Alt + F4`
not working.
Release Notes:
- N/A
2024-03-13 22:10:22 +03:00
|
|
|
"Win32_UI_Controls",
|
2024-03-16 03:17:26 +03:00
|
|
|
"Win32_UI_HiDpi",
|
2024-03-15 01:29:25 +03:00
|
|
|
"Win32_UI_Input_Ime",
|
windows: Better keyboard input support (#9180)
### Description
Currently, there are some issues with input handling on Windows:
#### 1. Direct crash when encountering IME input.
https://github.com/zed-industries/zed/assets/14981363/598f7272-1948-4a42-99c5-2ef7b9162a1e
#### 2. Handling messages every 1/60 seconds in the main thread. Despite
being named "immediate_handle," it's not exactly immediate.
```rust
// actually halt here
let wait_result =
unsafe { DCompositionWaitForCompositorClock(Some(&[self.inner.event]), INFINITE) };
// compositor clock ticked so we should draw a frame
if wait_result == 1 {
unsafe { invalidate_thread_windows(GetCurrentThreadId()) };
while unsafe { PeekMessageW(&mut msg, HWND::default(), 0, 0, PM_REMOVE) }.as_bool()
```
#### 3. According to Windows recommendations, character input should be
obtained using `WM_CHAR` instead of `WM_KEYDOWN`. Additionally, there
are problems with the handling within `WM_CHAR`.
```rust
fn handle_char_msg(&self, wparam: WPARAM) -> LRESULT {
let mut callbacks = self.callbacks.borrow_mut();
if let Some(callback) = callbacks.input.as_mut() {
let modifiers = self.current_modifiers();
let msg_char = wparam.0 as u8 as char; // these are u16 chars, cant treat them as u8
```
And, we don't handle `WM_SYSKEYDOWN` properly, which leads to `Alt + F4`
not working.
Release Notes:
- N/A
2024-03-13 22:10:22 +03:00
|
|
|
"Win32_UI_Input_KeyboardAndMouse",
|
|
|
|
"Win32_UI_Shell",
|
|
|
|
"Win32_UI_WindowsAndMessaging",
|
2024-03-03 22:58:31 +03:00
|
|
|
]
|
|
|
|
|
2021-04-02 20:02:09 +03:00
|
|
|
[patch.crates-io]
|
2024-03-25 19:54:43 +03:00
|
|
|
tree-sitter = { git = "https://github.com/tree-sitter/tree-sitter", rev = "7f21c3b98c0749ac192da67a0d65dfe3eabc4a63" }
|
2024-02-14 14:55:31 +03:00
|
|
|
# Workaround for a broken nightly build of gpui: See #7644 and revisit once 0.5.3 is released.
|
2024-03-18 00:29:58 +03:00
|
|
|
pathfinder_simd = { git = "https://github.com/servo/pathfinder.git", rev = "30419d07660dc11a21e42ef4a7fa329600cff152" }
|
2022-07-09 00:08:35 +03:00
|
|
|
|
2021-04-20 01:00:10 +03:00
|
|
|
[profile.dev]
|
|
|
|
split-debuginfo = "unpacked"
|
2023-11-23 19:54:43 +03:00
|
|
|
debug = "limited"
|
2021-05-07 15:42:56 +03:00
|
|
|
|
2024-02-27 03:27:57 +03:00
|
|
|
[profile.dev.package]
|
|
|
|
taffy = { opt-level = 3 }
|
|
|
|
cranelift-codegen = { opt-level = 3 }
|
2024-04-01 18:56:17 +03:00
|
|
|
resvg = { opt-level = 3 }
|
2024-03-05 17:37:28 +03:00
|
|
|
rustybuzz = { opt-level = 3 }
|
|
|
|
ttf-parser = { opt-level = 3 }
|
2024-02-27 03:27:57 +03:00
|
|
|
wasmtime-cranelift = { opt-level = 3 }
|
2024-03-23 03:29:06 +03:00
|
|
|
wasmtime = { opt-level = 3 }
|
2023-11-16 10:15:14 +03:00
|
|
|
|
2021-05-07 15:42:56 +03:00
|
|
|
[profile.release]
|
2023-11-23 19:54:43 +03:00
|
|
|
debug = "limited"
|
2023-06-06 22:50:08 +03:00
|
|
|
lto = "thin"
|
2023-06-22 19:06:17 +03:00
|
|
|
codegen-units = 1
|
2024-02-26 12:08:57 +03:00
|
|
|
|
chore: Merge zed lib with zed binary.
TL;DR:
- shaves off about 0.5 seconds from most of our debug builds.
- It would've slightly regressed release build due to preventing build pipelining, but as a tradeoff I've bumped up codegen-units for zed.
\# What did you come up with this time Piotr
In our zed repository I've noticed that merely *loading dependencies* in each crate takes non-trivial amount of time (~800ms in case of editor).
That is to say, the moment you \`use editor\`, your build time increases by 800ms - this happens just once in crate though, as it looks like compiler has to load .rlibs of all of the referenced dependencies.
This is visible under rustc's self-profile. Repro steps on twitter: https://twitter.com/PiotrOsiewicz/status/1762845413072101567
\# How does this commit alleviate this?
zed lib + zed bin are on critical path of every build and cumulatively take about 3s to build. This commit bundles all of this up into ~2.2s of bin build time instead.
\# Wait, splitting binary targets is good, no?
Splitting up a binary target into lib + bin is generally considered to be a good practice, as you can then reuse the lib part elsewhere if needed.
It also allows the build to kick off the moment metadata for all of the dependencies is available (thus, you don't need to wait for codegen).
However, we do not really use zed as a lib, so the first benefit is not really a thing for us.
The latter *is* indeed something we lose out on in release mode (in dev codegen phase of leaf-ish crates is insignificant, as we use shared generics - thus we don't spend much time codegening).
That's why I've bumped codegen units for zed crate to 16 in release mode to keep build times in tact.
2024-03-19 03:11:36 +03:00
|
|
|
[profile.release.package]
|
|
|
|
zed = { codegen-units = 16 }
|
|
|
|
|
2024-03-05 20:01:17 +03:00
|
|
|
[workspace.lints.clippy]
|
|
|
|
dbg_macro = "deny"
|
|
|
|
todo = "deny"
|
|
|
|
|
2024-03-14 23:02:03 +03:00
|
|
|
# Motivation: We use `vec![a..b]` a lot when dealing with ranges in text, so
|
|
|
|
# warning on this rule produces a lot of noise.
|
|
|
|
single_range_in_vec_init = "allow"
|
|
|
|
|
2024-03-05 20:01:17 +03:00
|
|
|
# These are all of the rules that currently have violations in the Zed
|
|
|
|
# codebase.
|
|
|
|
#
|
|
|
|
# We'll want to drive this list down by either:
|
|
|
|
# 1. fixing violations of the rule and begin enforcing it
|
|
|
|
# 2. deciding we want to allow the rule permanently, at which point
|
|
|
|
# we should codify that separately above.
|
|
|
|
#
|
|
|
|
# This list shouldn't be added to; it should only get shorter.
|
|
|
|
# =============================================================================
|
|
|
|
|
|
|
|
# There are a bunch of rules currently failing in the `style` group, so
|
|
|
|
# allow all of those, for now.
|
|
|
|
style = "allow"
|
|
|
|
|
|
|
|
# Individual rules that have violations in the codebase:
|
|
|
|
almost_complete_range = "allow"
|
|
|
|
arc_with_non_send_sync = "allow"
|
|
|
|
borrowed_box = "allow"
|
|
|
|
let_underscore_future = "allow"
|
|
|
|
map_entry = "allow"
|
|
|
|
non_canonical_partial_ord_impl = "allow"
|
|
|
|
reversed_empty_ranges = "allow"
|
|
|
|
type_complexity = "allow"
|
|
|
|
|
2024-02-26 12:08:57 +03:00
|
|
|
[workspace.metadata.cargo-machete]
|
|
|
|
ignored = ["bindgen", "cbindgen", "prost_build", "serde"]
|