Skip to main content

Module schema

Module schema 

Source
Expand description

Schema provider system for structured file validation and completion.

§Overview

A SchemaProvider maps file paths to SchemaContent (JSON Schema strings). Multiple providers live in a SchemaRegistry; the first matching provider wins when resolving a file.

Extensions may declare packaged schemas in extension.yaml and include schema files inside the .cyix archive; the manager registers those schemas when the extension is enabled. Built-in providers can be registered directly via SchemaRegistry::register.

§File matching

Each provider describes the files it covers via FilePattern:

PatternKindMatches
"Cargo.toml"FilenameAny file named Cargo.toml
"*.yaml"GlobAny YAML file (by name)
"**/*.json"GlobAny JSON file anywhere
".github/workflows/*.yml"GlobGitHub Actions workflow files

Re-exports§

pub use deep_completion::completions_from_schema;
pub use deep_completion::completions_from_parsed_schema;
pub use registry::SchemaRegistry;

Modules§

context
Format-agnostic cursor context types for schema-driven completion.
deep_completion
format
Format-specific cursor context detectors.
registry
SchemaRegistry — central store for all registered schema providers.

Structs§

SchemaContent
Content of a resolved schema.

Enums§

FilePattern
A file-matching pattern used by schema providers to declare which files they cover.

Traits§

SchemaProvider
A type that can provide a JSON Schema for a given file path.