ZIm/crates/gpui/src
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
..
app Improve panic report with reentrant SlotMap use (#22667) 2025-01-04 20:37:40 +00:00
elements Delay hiding git blame tooltip (#22644) 2025-01-18 20:52:14 +00:00
keymap Load all key bindings that parse and use markdown in error notifications (#23113) 2025-01-18 22:27:08 +00:00
platform Load all key bindings that parse and use markdown in error notifications (#23113) 2025-01-18 22:27:08 +00:00
text_system gpui/perf: Use SharedString on API boundary of line layout (#22566) 2025-01-02 11:06:01 +00:00
window chore: Fix several style lints (#17488) 2024-09-06 11:58:39 +02:00
action.rs Load all key bindings that parse and use markdown in error notifications (#23113) 2025-01-18 22:27:08 +00:00
app.rs Load all key bindings that parse and use markdown in error notifications (#23113) 2025-01-18 22:27:08 +00:00
arena.rs Log if element arena allocation is >80% 2024-01-24 11:03:28 +01:00
asset_cache.rs Add Loading and Fallback States to Image Elements (via StyledImage) (#20371) 2024-11-15 19:12:01 -08:00
assets.rs repl: Set up a way to copy output from the REPL (#16649) 2024-08-22 15:03:42 -07:00
bounds_tree.rs chore: Fix several style lints (#17488) 2024-09-06 11:58:39 +02:00
color.rs gpui: Add linear gradient support to fill background (#20812) 2024-12-11 21:52:52 +02:00
element.rs Store focus handles in AppContext instead of Window (#22158) 2024-12-17 14:41:00 -07:00
executor.rs Remove Task::get_ready method I added, which is unusable in practice (#22012) 2024-12-14 03:21:41 -07:00
geometry.rs Fix docs for Bounds::from_corner_and_size (#22265) 2024-12-19 21:50:52 +00:00
global.rs Add support for git branches on remote projects (#19755) 2024-10-27 15:50:54 -07:00
gpui.rs Improve keymap json schema (#23044) 2025-01-13 02:34:35 +00:00
input.rs Clip UTF-16 offsets in text for range (#20968) 2024-11-20 22:04:26 -07:00
interactive.rs Dequalify WindowContext and ViewContext references (#22477) 2024-12-28 23:09:55 +00:00
key_dispatch.rs Improve doc comments about keybinding order (#23014) 2025-01-11 22:47:42 +00:00
keymap.rs Improve doc comments about keybinding order (#23014) 2025-01-11 22:47:42 +00:00
platform.rs Add a dedicated action to open files (#22625) 2025-01-08 14:29:15 +00:00
prelude.rs gpui: Don't export named Context from prelude (#21869) 2024-12-11 13:21:40 -05:00
scene.rs gpui: Add linear gradient support to fill background (#20812) 2024-12-11 21:52:52 +02:00
shared_string.rs gpui/perf: Use SharedString on API boundary of line layout (#22566) 2025-01-02 11:06:01 +00:00
shared_uri.rs Rework loading images from files (#7088) 2024-01-30 11:26:02 -05:00
style.rs Add Corner to geometry and make names of corner methods consistent (#22119) 2024-12-16 22:57:15 -07:00
styled.rs gpui: Clean up Styled doc comments (#20731) 2024-11-15 11:27:49 -05:00
subscription.rs Refine inline transformation UX (#12939) 2024-06-13 08:35:22 +02:00
svg_renderer.rs Add Loading and Fallback States to Image Elements (via StyledImage) (#20371) 2024-11-15 19:12:01 -08:00
taffy.rs Revert "chore: Bump taffy to 0.5.2 (#18729)" (#19189) 2024-10-14 15:19:10 +02:00
test.rs deps: Bump smol to 2.0 (#22956) 2025-01-10 13:38:00 +00:00
text_system.rs gpui/perf: Use SharedString on API boundary of line layout (#22566) 2025-01-02 11:06:01 +00:00
util.rs chore: Fix several style lints (#17488) 2024-09-06 11:58:39 +02:00
view.rs Cleanups preparing for WindowContext refactor (#22475) 2024-12-28 21:36:14 +00:00
window.rs Delay hiding git blame tooltip (#22644) 2025-01-18 20:52:14 +00:00