import { Contributor } from './Contributor'; import { LanguageConfigBuilderFactory } from './LanguageConfig'; import { LanguageDefinition } from './LanguageDefinition'; import { SyntaxComponentParser } from './SyntaxComponent'; /** * The symbol for storing the ID of this plugin. There's no technical regulations to * the format of this ID, but conventionally we use the same format as an namespaced ID. * Unless explicitly stated, this also applies to other "ID"s used in the plugin. */ export declare const PluginID: unique symbol; export interface Plugin { /** * The ID of this plugin. There's no technical regulations to the format of this ID, * but conventionally we use the same format as an namespaced ID. Unless explicitly * stated, this also applies to other "ID"s used in the plugin. */ [PluginID]: Readonly; /** * Contributes language definitions for languages that derives from `mcfunction`. * @param contributor A contributor to add `LanguageDefinition`s with their language IDs. * A language ID is usally something related to the language's file extension and/or name, * e.g. the ID for mcfunctions is `mcfunction` and the ID for JSON files is `json`. */ contributeLanguages?: (contributor: Contributor) => void | Promise; /** * Contributes syntax components. * @param contributor A contributor to add `SyntaxComponent`s with their assigned IDs. */ contributeSyntaxComponentParsers?: (contributor: Contributor>) => void | Promise; /** * Configures languages. All configurations provided by different plugins to the * same language ID are merged together by the language server. * @param factory A factory to get `LanguageConfigurationBuilder` for a language ID. */ configureLanguages?: (factory: LanguageConfigBuilderFactory) => void | Promise; } export declare namespace Plugin { function is(value: any): value is Plugin; }