Files
vamp/docs/development.md
T

2.1 KiB

Development

README

Local verification and implementation constraints. See architecture for ownership and frontend contracts.

Verify

cargo test
cargo clippy --all-targets -- -D warnings
cargo fmt --check
ruby -c src/ruby_host.rb

Test organization

Rust tests live alongside their modules; native LSP integration checks are in tests/lsp.rs.

  • Editor checks cover Unicode editing, multi-target state, undo/redo, saving failures, and modal paste acceptance and rejection atomicity.
  • Session and Ruby checks exercise real Ruby execution, command/capability ownership, effect validation, configuration fallback, plugin retirement, crash/timeout recovery, and inherited-pipe cleanup.
  • Unix terminal-hook checks use isolated child processes and real PTYs to keep process-global hooks out of the parallel runner. They cover cleanup on entry failure, normal return, I/O errors, and panics, including original panic-payload propagation.
  • Native LSP integration checks launch framed-protocol fixture subprocesses, covering initialization/settings, opt-in startup, synchronization, UTF-16/file-URI conversion, dirty targets, stale requests/diagnostics, and transport failures.
  • Hover regression checks cover content forms, sanitization, cancelled/superseded replies, invalid results, scrolling/dismissal, Unicode clipping, and preserved editing state.

Clipboard checks use isolated providers rather than reading or overwriting the desktop clipboard.

Performance and process limits

  • Undo uses full-buffer snapshots and movement scans the current line. This favors straightforward correctness over large-file performance.
  • Legacy synchronous plugin invocation may pause input for up to 500 ms before a host timeout. Async plugins opt into background replies; pending requests and transport queues are bounded. Config/plugin startup has a 2-second deadline per host. Buffer context/document snapshots must fit within a 4 MiB JSON frame; a too-large frame disables that plugin, not editing.

See syntax caches for the current full-tree highlighting ceiling.