Skip to main content

register_snippet_modes

Function register_snippet_modes 

Source
pub fn register_snippet_modes(
    registry: &mut ModeRegistry,
    snippet_registry: Arc<SharedSnippetRegistry>,
) -> SnippetActivationPolicyHandle
Expand description

Register snippet-completion-mode against registry using snippet_registry as the contribution-side handle. The App shares the same Arc<SnippetRegistry> with this mode so source produce + host accept-path read the same data. Returns the shared SnippetActivationPolicyHandle the snippet-mode gate reads. The host stores a clone on Editor and folds snippet.activation / snippet.languages into it at boot + on :set (SN.3b); the default cell value is ActivationPolicy::Global.