Avoid text completions for a custom language if a specialized CompletionItemProvider is registered
I have written a custom completion provider and registered it with registerCompletionItemProvider at Monaco. It is working just fine.
However if I don't have completions and return an empty list from the provider Monaco seems to ask another provider and returns the list of all tokens in the editor window. Can this somehow be disabled in order to let Monaco really show no suggestions for that place?
There is a setting editor.wordBasedSuggestions which controls this.
@jrieken Thanks. I can see this setting in VS Code. But I don't see where to apply it in monaco. Passing wordBasedSuggestions: false to monaco.editor.create does not work and monaco.d.ts does not list the setting at all. Any additional hint?
Property wordBasedSuggestions does not exist on type IStandaloneCodeEditor. So yeah, I don't see it on there either. Did it not get surfaced properly?
That's true - it's only exposed via the configuration service but not yet as an explicit editor setting
@jrieken can you tell me how I would go about setting this to false through the configuration service? I don't seem to be able to see how I can turn off the word based suggestions.
We don't expose the configuration service here but 're-export' each editor specific setting via the editor. We must do the same once again for this setting
fix in https://github.com/Microsoft/vscode/commit/4d37b86195ec077eca40ab3abc290bde4b69bcf5
Oops, still have this problem. I set wordBasedSuggestions to false but when my provider returns nothing the editor will popup word based suggestions according to the existing input.