37 lines
1.8 KiB
Markdown
37 lines
1.8 KiB
Markdown
# 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.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.
|
|
|
|
```ruby
|
|
config.bind "leader n", config.core.word_next, mode: config.modes.normal
|
|
config.lsp["my-language"] = { command: ["my-language-server"], extensions: ["myl"] }
|
|
```
|