Monaco-editor: Question: Where to get started to write a custom completion provider?

Created on 18 Oct 2016  路  2Comments  路  Source: microsoft/monaco-editor

I'd like to write a custom completion provider, to supplement other completion providers active in the editor. Where is Monaco's API for this, and what is an example?

monaco-editor npm version: 0.X.Y
Browser:
OS:

Most helpful comment

You can call monaco.langauges.registerCompletionItemProvider, to which you provide a language id and a CompletionItemProvider. Your CompletionItemProvider should just implement this interface. It should be fairly straightforward from there, looking over that typings file is often really helpful.

All 2 comments

You can call monaco.langauges.registerCompletionItemProvider, to which you provide a language id and a CompletionItemProvider. Your CompletionItemProvider should just implement this interface. It should be fairly straightforward from there, looking over that typings file is often really helpful.

There is also a full working example at https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-completion-provider-example

Was this page helpful?
0 / 5 - 0 ratings

Related issues

akosyakov picture akosyakov  路  3Comments

galyech picture galyech  路  3Comments

ststeiger picture ststeiger  路  3Comments

fabiospampinato picture fabiospampinato  路  3Comments

Kang-Jun-sik picture Kang-Jun-sik  路  3Comments