parent
e3c73c2759
commit
89991f744c
@ -0,0 +1,34 @@ |
|||||||
|
/* eslint-disable no-control-regex */ |
||||||
|
import { EditorUIProps, monacoTypes } from '@remix-ui/editor'; |
||||||
|
|
||||||
|
export class RemixSolidityDocumentationProvider implements monacoTypes.languages.InlineCompletionsProvider{ |
||||||
|
props:EditorUIProps |
||||||
|
monaco:any |
||||||
|
completion:string |
||||||
|
|
||||||
|
constructor(completion: any){ |
||||||
|
this.completion = completion |
||||||
|
} |
||||||
|
|
||||||
|
async provideInlineCompletions(model: monacoTypes.editor.ITextModel, position: monacoTypes.Position, context: monacoTypes.languages.InlineCompletionContext, token: monacoTypes.CancellationToken): Promise<monacoTypes.languages.InlineCompletions<monacoTypes.languages.InlineCompletion>> { |
||||||
|
const item: monacoTypes.languages.InlineCompletion = { |
||||||
|
insertText: this.completion |
||||||
|
}; |
||||||
|
console.log("provided docu completion") |
||||||
|
|
||||||
|
return { |
||||||
|
items: [item], |
||||||
|
enableForwardStability: true |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
handleItemDidShow?(completions: monacoTypes.languages.InlineCompletions<monacoTypes.languages.InlineCompletion>, item: monacoTypes.languages.InlineCompletion, updatedInsertText: string): void { |
||||||
|
|
||||||
|
} |
||||||
|
handlePartialAccept?(completions: monacoTypes.languages.InlineCompletions<monacoTypes.languages.InlineCompletion>, item: monacoTypes.languages.InlineCompletion, acceptedCharacters: number): void { |
||||||
|
|
||||||
|
} |
||||||
|
freeInlineCompletions(completions: monacoTypes.languages.InlineCompletions<monacoTypes.languages.InlineCompletion>): void { |
||||||
|
|
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue