You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is not a bug report. (please use a different template for reporting a bug)
This issue is not a duplicate of an existing issue. (please use the search to find existing issues)
Description
When we develop our own code completion implementing the CompletionItemProvider interface we are bound to a set of trigger characters that make the popup to be shown. This in some cases is not really convenient as the popup shows in the wrong context. For example I'm interested in displaying autocompletion in case of identifier usage and not to show it when declaring one. While searching the internet I was able to find some "dirty" suggestions like sending events. See #1764.
Anyway, can we have a predicate function instead or in addition to the triggerCharacters array? It could look like this:
triggerPopup(model, position, context): boolean
Then we can have an access to model to do some parsing and make a decision based on last token. We have a context to find out which event triggered the function and we know a cursor position. Probably, a delay to call this predicate should be set in the editor configuration, so it won't be called too often.
Monaco Editor Playground Link
No response
Monaco Editor Playground Code
No response
The text was updated successfully, but these errors were encountered:
Context
Description
When we develop our own code completion implementing the
CompletionItemProvider
interface we are bound to a set of trigger characters that make the popup to be shown. This in some cases is not really convenient as the popup shows in the wrong context. For example I'm interested in displaying autocompletion in case of identifier usage and not to show it when declaring one. While searching the internet I was able to find some "dirty" suggestions like sending events. See #1764.Anyway, can we have a predicate function instead or in addition to the
triggerCharacters
array? It could look like this:Then we can have an access to
model
to do some parsing and make a decision based on last token. We have acontext
to find out which event triggered the function and we know a cursorposition
. Probably, a delay to call this predicate should be set in the editor configuration, so it won't be called too often.Monaco Editor Playground Link
No response
Monaco Editor Playground Code
No response
The text was updated successfully, but these errors were encountered: