Skip to content

Instantly share code, notes, and snippets.

@david-arteaga
Created November 27, 2020 15:41
Show Gist options
  • Save david-arteaga/423a7adce17b6a8951162188d6f72c24 to your computer and use it in GitHub Desktop.
Save david-arteaga/423a7adce17b6a8951162188d6f72c24 to your computer and use it in GitHub Desktop.
Re-render Monaco editor completions widget
/**
* This is useful when you have both sync and async completions and don't want to have to wait for the async completions to resolve
* to show the already available sync completions.
*/
function rerenderCompletions() {
editor.trigger('editor', 'hideSuggestWidget', null);
editor.trigger('source', 'editor.action.triggerSuggest', null);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment