UNPKG

@ym-han/monaco-error-lens

Version:

Error Lens for Monaco Editor, adapted from the VSCode Error Lens extension: makes diagnostics more visible with inline messages, line highlighting, and gutter icons. WARNING: Very experimental; use with caution.

90 lines 2.27 kB
import { ErrorLensOptions, ErrorLensConfig, MonacoEditor, MonacoModule } from './types'; import { SimpleEventEmitter } from './event-emitter'; /** * Main Monaco Error Lens class that provides visual diagnostic enhancements */ export declare class MonacoErrorLens { private editor; private monaco; private config; private disposables; private isDisposed; private updateDecorations; private cancelUpdateDecorations; private decorationManager; private eventEmitter; constructor(editor: MonacoEditor, monaco: MonacoModule, options?: ErrorLensOptions); /** * Initialize the Error Lens instance */ private initialize; /** * Check if Monaco Editor is fully initialized with required APIs */ private isMonacoInitialized; /** * Inject CSS styles for Error Lens */ private injectStyles; /** * Generate CSS styles for Error Lens */ private generateCSS; /** * Generate CSS custom properties for user-defined colors */ private generateCustomProperties; /** * Set up Monaco editor event listeners */ private setupEventListeners; /** * Update decorations based on current markers */ private updateDecorationsInternal; /** * Filter markers based on configuration */ private filterMarkers; /** * Clear all decorations */ private clearDecorations; /** * Update configuration options */ updateOptions(newOptions: Partial<ErrorLensOptions>): void; /** * Enable the Error Lens */ enable(): void; /** * Disable the Error Lens */ disable(): void; /** * Toggle Error Lens on/off */ toggle(): boolean; /** * Force update decorations immediately */ refresh(): void; /** * Get current configuration */ getConfig(): Readonly<ErrorLensConfig>; /** * Get the event emitter for listening to Error Lens events */ getEventEmitter(): SimpleEventEmitter; /** * Check if Error Lens is currently active */ isActive(): boolean; /** * Dispose of the Error Lens instance */ dispose(): void; } //# sourceMappingURL=monaco-error-lens.d.ts.map