/** * Code Action Provider for DomainLang. * * Provides quick-fix code actions for validation diagnostics. * * Key Features: * - "Add dependency to model.yaml" for unknown import aliases * - "Run dlang install" for uninstalled dependencies * * @module */ import type { CodeAction, CodeActionParams, Command } from 'vscode-languageserver'; import type { MaybePromise, LangiumDocument } from 'langium'; import type { CodeActionProvider } from 'langium/lsp'; /** * Code action provider for DomainLang LSP features. * * Implements quick fixes for: * - Import validation errors (add to model.yaml, run install) */ export declare class DomainLangCodeActionProvider implements CodeActionProvider { /** * Generates code actions for the given diagnostics. * * @param document - The document containing the diagnostics * @param params - Code action request parameters including diagnostics * @returns Array of code actions, or undefined if none applicable */ getCodeActions(document: LangiumDocument, params: CodeActionParams): MaybePromise | undefined>; /** * Creates code actions for a specific diagnostic. * * Matches on diagnostic.code to determine which quick fix to offer. */ private createCodeActions; /** * Creates a code action to add a dependency to model.yaml. * * This generates a WorkspaceEdit that modifies model.yaml to add * the missing dependency with a placeholder version. */ private createAddToManifestAction; /** * Creates a code action to create model.yaml with the dependency. */ private createCreateManifestAction; /** * Creates a code action to run dlang install. */ private createRunInstallAction; /** * Creates a code action to add ref to dependency. */ private createAddRefAction; }