refactor: derive canonical commands from core actions and centralize aliases
This commit is contained in:
+6
-1
@@ -23,10 +23,15 @@ The presentation and input experience through which a user interacts with an edi
|
||||
**Capability**:
|
||||
A named frontend ability required by a feature for compatibility, not a permission granted to that feature.
|
||||
|
||||
**Canonical Ex command**:
|
||||
The full command name of a command-capable core action, without its `core.` prefix. For example, `core.quit` names the canonical `quit` command.
|
||||
|
||||
**Command alias**:
|
||||
A shorthand spelling of a canonical Ex command, such as `q` for `quit`. An alias refers to the same action, not a separate command implementation.
|
||||
|
||||
## Configuration interfaces
|
||||
|
||||
- Prefer typed objects for editor-owned actions, modes, and other closed sets. Expose new core binding targets through `config.core` rather than requiring command-name strings.
|
||||
- `src/editor.rs`'s `CORE_ACTIONS` is authoritative for core action names, eligibility, and Ex aliases. Ruby action methods and nested namespaces, protected core command registration, and palette entries are generated from this catalog; add or rename actions there rather than maintaining separate lists.
|
||||
- Use strings for open-ended identifiers: language IDs, paths, and external plugin command names. Interactive Ex command names remain textual.
|
||||
- Ruby action/mode objects provide validation during configuration evaluation and discoverable members, not compile-time enum safety.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user