zed/crates
Michael Sloan 711dc21eb2
Load all key bindings that parse and use markdown in error notifications (#23113)
* Collects and reports all parse errors

* Shares parsed `KeyBindingContextPredicate` among the actions.

* Updates gpui keybinding and action parsing to return structured
errors.

* Renames "block" to "section" to match the docs, as types like
`KeymapSection` are shown in `json-language-server` hovers.

* Removes wrapping of `context` and `use_key_equivalents` fields so that
`json-language-server` auto-inserts `""` and `false` instead of `null`.

* Updates `add_to_cx` to take `&self`, so that the user keymap doesn't
get unnecessarily cloned.

In retrospect I wish I'd just switched to using TreeSitter to do the
parsing and provide proper diagnostics. This is tracked in #23333

Release Notes:

- Improved handling of errors within the user keymap file. Parse errors
within context, keystrokes, or actions no longer prevent loading the key
bindings that do parse.
2025-01-18 22:27:08 +00:00
..
activity_indicator chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
anthropic chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
assets chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
assistant editor: Hide horizontal scrollbar if not visible (#23337) 2025-01-18 21:50:07 +00:00
assistant2 editor: Hide horizontal scrollbar if not visible (#23337) 2025-01-18 21:50:07 +00:00
assistant_settings chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
assistant_slash_command chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
assistant_slash_commands chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
assistant_tool chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
assistant_tools chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
audio chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
auto_update chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
auto_update_ui chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
breadcrumbs chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
call Allow filling co-authors in the git panel's commit input (#23329) 2025-01-18 22:57:17 +02:00
channel Allow filling co-authors in the git panel's commit input (#23329) 2025-01-18 22:57:17 +02:00
cli chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
client Allow filling co-authors in the git panel's commit input (#23329) 2025-01-18 22:57:17 +02:00
clock chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
collab Load all key bindings that parse and use markdown in error notifications (#23113) 2025-01-18 22:27:08 +00:00
collab_ui Allow filling co-authors in the git panel's commit input (#23329) 2025-01-18 22:57:17 +02:00
collections chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
command_palette Load all key bindings that parse and use markdown in error notifications (#23113) 2025-01-18 22:27:08 +00:00
command_palette_hooks chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
context_server chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
context_server_settings chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
copilot chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
db chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
diagnostics chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
docs_preprocessor Load all key bindings that parse and use markdown in error notifications (#23113) 2025-01-18 22:27:08 +00:00
editor editor: Hide horizontal scrollbar if not visible (#23337) 2025-01-18 21:50:07 +00:00
evals chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
extension chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
extension_api chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
extension_cli chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
extension_host chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
extensions_ui chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
feature_flags chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
feedback chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
file_finder chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
file_icons chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
fireworks chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
fs chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
fsevent chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
fuzzy chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
git git: Implement commit creation (#23263) 2025-01-17 18:51:20 +00:00
git_hosting_providers chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
git_ui Allow filling co-authors in the git panel's commit input (#23329) 2025-01-18 22:57:17 +02:00
go_to_line chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
google_ai chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
gpui Load all key bindings that parse and use markdown in error notifications (#23113) 2025-01-18 22:27:08 +00:00
gpui_macros chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
html_to_markdown html_to_markdown: Restore ability to publish (#23293) 2025-01-17 17:57:13 +00:00
http_client chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
image_viewer chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
indexed_docs chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
inline_completion chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
inline_completion_button chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
install_cli chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
journal chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
language chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
language_extension chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
language_model chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
language_model_selector chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
language_models chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
language_selector chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
language_tools Load all key bindings that parse and use markdown in error notifications (#23113) 2025-01-18 22:27:08 +00:00
languages chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
livekit_client chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
livekit_client_macos chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
livekit_server chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
lmstudio chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
lsp Revert "lsp: Parse LSP messages on background thread - again (#23122)" (#23301) 2025-01-17 15:06:10 -07:00
markdown chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
markdown_preview Load all key bindings that parse and use markdown in error notifications (#23113) 2025-01-18 22:27:08 +00:00
media chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
menu chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
multi_buffer chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
node_runtime chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
notifications chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
ollama chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
open_ai chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
outline chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
outline_panel chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
paths chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
picker chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
prettier chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
project lsp: Skip computation of edits_since_save when there are no disk based diagnostics (#23269) 2025-01-18 13:28:44 -07:00
project_panel git: Implement commit creation (#23263) 2025-01-17 18:51:20 +00:00
project_symbols chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
prompt_library chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
proto Allow filling co-authors in the git panel's commit input (#23329) 2025-01-18 22:57:17 +02:00
recent_projects terminal: Add scrollbar (#23256) 2025-01-18 17:36:41 +01:00
refineable chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
release_channel chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
remote chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
remote_server chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
repl chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
reqwest_client chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
rich_text chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
rope chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
rpc chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
search chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
semantic_index chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
semantic_version chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
session chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
settings Load all key bindings that parse and use markdown in error notifications (#23113) 2025-01-18 22:27:08 +00:00
settings_ui chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
snippet chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
snippet_provider chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
snippets_ui chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
sqlez chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
sqlez_macros chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
story chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
storybook Load all key bindings that parse and use markdown in error notifications (#23113) 2025-01-18 22:27:08 +00:00
streaming_diff chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
sum_tree chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
supermaven chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
supermaven_api chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
tab_switcher chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
task chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
tasks_ui chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
telemetry chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
telemetry_events chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
terminal terminal: Add scrollbar (#23256) 2025-01-18 17:36:41 +01:00
terminal_view terminal: Add scrollbar (#23256) 2025-01-18 17:36:41 +01:00
text chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
theme chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
theme_extension chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
theme_importer chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
theme_selector chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
time_format chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
title_bar chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
toolchain_selector chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
ui terminal: Add scrollbar (#23256) 2025-01-18 17:36:41 +01:00
ui_input chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
ui_macros chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
util chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
vcs_menu chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
vim Load all key bindings that parse and use markdown in error notifications (#23113) 2025-01-18 22:27:08 +00:00
vim_mode_setting chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
welcome chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
workspace Allow filling co-authors in the git panel's commit input (#23329) 2025-01-18 22:57:17 +02:00
worktree git: Implement commit creation (#23263) 2025-01-17 18:51:20 +00:00
zed Load all key bindings that parse and use markdown in error notifications (#23113) 2025-01-18 22:27:08 +00:00
zed_actions chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
zeta chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00