import { FC, MutableRefObject } from 'react';
import { MonacoLanguageClient } from 'monaco-languageclient';
import { editor as MonacoEditor, Position } from 'monaco-editor';
import { ICodeEditorService } from 'vscode/services';
import { ISemanticTokenInfo } from '../../utils/semanticTokens';
import { ITextMateTokenInfo } from '../../utils/textmateTokens';

export type LSPContextType = {
    inited: boolean;
    clientRef: MutableRefObject<MonacoLanguageClient | undefined>;
    lastError: Event | null;
    reload: () => void;
    getTokenAtPosition: (editor: MonacoEditor.IStandaloneCodeEditor, model: MonacoEditor.ITextModel, position: Position) => Promise<{
        semanticTokenInfo: ISemanticTokenInfo | null;
        textmateTokenInfo: ITextMateTokenInfo | null;
    } | null>;
};
export type ICodeEditorOpenHandler = Parameters<ICodeEditorService['registerCodeEditorOpenHandler']>[0];
export declare const LSPProvider: FC<{
    language?: string;
    url: string;
    qodly: boolean;
    defaultZoom?: number;
    defaultInited?: boolean;
    openHandler?: ICodeEditorOpenHandler;
}>;
export declare function useLSP(): LSPContextType;
