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
trigger auto-complete (suggestions) programmatically #74
Comments
|
I tried the above and it doesn't seem to trigger the suggestion. In addition, it's a strange construct. The text matching matches the line to the current point (supposedly) but it actually returns "sum()" instead of "sum(" which I would have expected since the cursor is in-between the parenthesis. But even when I change the match to "sum()" it still doesn't actually show the auto-complete even though I'm returning a list. |
@jrieken This touches on the support to execute something/a command (that just happens to be to pop up suggestions again) when a completion item is accepted. Maybe you keep this request also in mind when designing it? |
@alexandrudima how to send suggest items when do the triggerSuggest? |
My case is when I input the editor.onDidChangeModelContent(e => {
if (e.text === '.') {
monaco.languages.registerCompletionItemProvider('sql', {
provideCompletionItems: () => {
return [
{
label: 'column1',
kind: monaco.languages.CompletionItemKind.Text
},
{
label: 'column2',
kind: monaco.languages.CompletionItemKind.Text
}
]
}
});
editor.trigger('source - use any string you like', 'editor.action.triggerSuggest', {});
}
}) if i use registerCompletionItemProvider, it should input I have researsh this case for about two days, i need some tip. Thanks! |
@alexandrudima Some response? |
Any update on this feature? I would love to have the possibility to re-open suggestion dialog once user accepts a previous completion item. any other workaround to know when suggestion was accepted? |
We can do that, set |
Is this fixed by this: microsoft/vscode#34565 ? If so, any chance monaco-editor-core version could be bumped? |
A new release will come eventually (not sure yet). Closing this issue because the underlying issue is fixed |
I have a suggestion as follows:
insertText: 'sum({{}})'
When the text is inserted the cursor is within the parenthesis appropriately. However, as soon as the text is inserted, I want to pop up the suggestions for what should go there without the user taking an action. I could not figure out how to accomplish this with a suggestion trigger which seems to have to be typed in by the user.
Thanks.
The text was updated successfully, but these errors were encountered: