Skip to content

Custom value autocompletion #67

@matthewkaney

Description

@matthewkaney

It would be great to have the ability to specify custom autocompletion sources for specific values. These sources could either be associated with a specific JSON Schema format tag, or specified as an array of completion functions that would receive the schema for the given property.

I'd be interested in implementing this as a PR, but wanted to reach out, as I'm still figuring out how CM6 autocompletions work, much less how they're specifically set up in this extension.

Perhaps something like this?

type JSONCompletionSource = (schema: JSONSchema7, ctx: CompletionContext) => CompletionResult | Promise <CompletionResult | null> | null;

type JSONCompletionOptions = {
  mode?: "json" | "json5";
  custom?: JSONCompletionSource[];
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions