/** * Create a language server for a unified ecosystem. * * @param {Options} options * Configuration for `unified-engine` and the language server. */ export function createUnifiedLanguageServer({ configurationSection, ignoreName, packageField, pluginPrefix, plugins, processorName, processorSpecifier, defaultProcessor, rcName }: Options): void; export type EngineFields = Pick; export type LanguageServerFields = { /** * The package ID of the expected processor (example: `'remark'`). * Will be loaded from the local workspace. */ processorName: string; /** * The specifier to get the processor on the resolved module. * For example, remark uses the specifier `remark` to expose its processor and * a default export can be requested by passing `'default'` (the default). */ processorSpecifier?: string | undefined; /** * Optional fallback processor to use if `processorName` can’t be found * locally in `node_modules`. * This can be used to ship a processor with your package, to be used if no * processor is found locally. * If this isn’t passed, a warning is shown if `processorName` can’t be found. */ defaultProcessor?: (() => import("unified").Processor) | undefined; /** * This option will be used to give the client a hint of which configuration * section to use. * For example VSCode extensions use this to pick only settings that use this * as a prefix in order to prevent conflicts and reduce the amount of data * sent to the language server. */ configurationSection: string; }; export type Options = EngineFields & LanguageServerFields; export type UnifiedLanguageServerSettings = { /** * If true, files will only be checked if a configuration file is present. */ requireConfig?: boolean | undefined; /** * Filepath to an ignore file to load. * When relative, it is resolved from the workspace folder. */ ignorePath?: string | undefined; /** * Resolve patterns in `ignorePath` from the workspace folder (`'cwd'`) * or the ignore file’s folder (`'dir'`, the default). */ ignorePathResolveFrom?: "cwd" | "dir" | undefined; }; import type { Options as EngineOptions } from 'unified-engine';