Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid text completions for a custom language if a specialized CompletionItemProvider is registered #59

Closed
Matthias247 opened this issue Jul 12, 2016 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities

Comments

@Matthias247
Copy link

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?

@jrieken
Copy link
Member

jrieken commented Jul 12, 2016

There is a setting editor.wordBasedSuggestions which controls this.

@jrieken jrieken closed this as completed Jul 12, 2016
@Matthias247
Copy link
Author

@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?

@jhurdlow
Copy link

Property wordBasedSuggestions does not exist on type IStandaloneCodeEditor. So yeah, I don't see it on there either. Did it not get surfaced properly?

@jrieken
Copy link
Member

jrieken commented Jul 14, 2016

That's true - it's only exposed via the configuration service but not yet as an explicit editor setting

@jrieken jrieken reopened this Jul 14, 2016
@jrieken jrieken added bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities and removed question labels Jul 14, 2016
@aarinsmith
Copy link

@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.

@jrieken
Copy link
Member

jrieken commented Jul 20, 2016

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

@jrieken
Copy link
Member

jrieken commented Jul 20, 2016

fix in microsoft/vscode@4d37b86

@jrieken jrieken closed this as completed Jul 20, 2016
@zanecola
Copy link

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.

@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

No branches or pull requests

5 participants