Open git102347501 opened 8 months ago
monaco.languages.registerCompletionItemProvider('sql', {
triggerCharacters: ['@'],
replaceTriggerChar: true, // For example, if this configuration is enabled, @ will be replaced
provideCompletionItems: (model, position) => {
let suggestions = [{label: "test", kind: "test", insertText: "test"}];
return { suggestions };
}
}
);
Context
Description
I hope that after entering @, a dropdown list will pop up for selection. After selection, the @ symbol needs to be removed, similar to: selecting test from the @ dropdown, and ultimately staying in the editor is test instead of @ test
Monaco Editor Playground Link
demo
Monaco Editor Playground Code