ZIm/crates/vim/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
..
digraph Add Vim digraphs (#14887) 2024-07-28 22:44:32 -06:00
normal vim: Fix vim delete to line (#23053) 2025-01-14 03:07:47 +00:00
test Load all key bindings that parse and use markdown in error notifications (#23113) 2025-01-18 22:27:08 +00:00
change_list.rs Add support for resizing panes using vim motions (#21038) 2024-11-26 16:24:29 -08:00
command.rs vim: ! support (#23169) 2025-01-16 21:19:15 -07:00
digraph.rs Improve keymap json schema (#23044) 2025-01-13 02:34:35 +00:00
helix.rs vim: Add delete action to HelixNormal mode (#21544) 2024-12-06 14:05:41 -07:00
indent.rs Add AutoIndent action and '=' vim operator (#21427) 2024-12-02 15:00:04 -08:00
insert.rs Revert "vim: Don't dismiss inline completion when switching to normal mode (#22075)" (#22131) 2024-12-17 09:24:33 +01:00
mode_indicator.rs Add support for resizing panes using vim motions (#21038) 2024-11-26 16:24:29 -08:00
motion.rs Improve keymap json schema (#23044) 2025-01-13 02:34:35 +00:00
normal.rs vim: ! support (#23169) 2025-01-16 21:19:15 -07:00
object.rs vim: Add Subword Textobject (#22387) 2025-01-14 03:34:49 +00:00
replace.rs Add support for resizing panes using vim motions (#21038) 2024-11-26 16:24:29 -08:00
rewrap.rs Add support for resizing panes using vim motions (#21038) 2024-11-26 16:24:29 -08:00
state.rs vim: ! support (#23169) 2025-01-16 21:19:15 -07:00
surrounds.rs Improve keymap json schema (#23044) 2025-01-13 02:34:35 +00:00
test.rs vim: Add sneak motion (#22793) 2025-01-10 07:07:32 +00:00
vim.rs vim: ! support (#23169) 2025-01-16 21:19:15 -07:00
visual.rs vim: Fix VisualYankLine (#22416) 2025-01-07 00:15:19 +00:00