Skip to main content

Module motions

Module motions 

Source
Expand description

Tree-sitter structural motions — ]f/[f/]F/[F (function), ]c/[c/]C/[C (class), ]a/[a/]A/[A (parameter), ]l/[l/]L/[L (loop). The motion counterpart to the structural text objects (text_objects.rs); both read the same textobjects.scm captures. See docs/dev/architecture/treesitter-motions.md.

Structs§

SyntaxMotionIds
The sixteen structural motion [MotionId]s, returned by register_syntax_motions so the host can bind their chords (]f/[f/]F/[F, ]c/[c/]C/[C, ]a/[a/]A/[A, ]l/[l/]L/[L) into the Normal/Visual/operator-pending motion keymap tables.

Functions§

register_syntax_motions
Register the sixteen structural motions on registry. Call once at boot (after the builtin grammar is registered); thread the returned ids into the keymap binder. Calling twice registers duplicates, so call exactly once.