1.8 KiB
vamp
A modal editor whose features are independent of the frontend used to present them.
Language
Editor session: An active editing environment containing a buffer, its modal state, and the plugins available to that environment. Avoid: plugin manager (when referring to the whole editing environment)
Feature: A named set of editor commands with declared frontend compatibility requirements.
Plugin: An extension that contributes a feature to an editor session. A failed plugin can become unavailable without ending the session.
Core feature: A protected feature that provides essential editing behavior and cannot be replaced or disabled by an extension.
Frontend: The presentation and input experience through which a user interacts with an editor session.
Capability: A named frontend ability required by a feature for compatibility, not a permission granted to that feature.
Configuration interfaces
- Prefer typed objects for editor-owned actions, modes, and other closed sets. Expose new core binding targets through
config.corerather than requiring command-name strings. src/editor.rs'sCORE_ACTIONSis authoritative for core action names and eligibility. Ruby action methods and nested namespaces are generated from its startup catalog; add or rename actions there rather than maintaining a second Ruby list.- 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.
config.bind "leader n", config.core.word_next, mode: config.modes.normal
config.lsp["my-language"] = { command: ["my-language-server"], extensions: ["myl"] }