Reputation: 64
Hi, we are trying to use the completion feature of the monaco editor. We have successfully added a rule for when the user types "composer". We see the completion popup menu. The proper icon is displayed, and visible. But the text is not visible, as shown in the screenshot. The underlying model seems to be valid: when we type enter, the offered text is inserted, as expected. Everything works, with the exception of the invisible text in the menu!
We tried tweaking the stylesheets in the Electron devtools. So far, to no avail. Any clues out there? thanks!
Here is our completion item provider rule:
{
label: 'sequence',
kind: monaco.languages.CompletionItemKind.Method,
documentation: 'hello world',
insertText: {
value: 'sequence'
}
}
Upvotes: 0
Views: 1684
Reputation: 64
Ok everyone, the lesson learned here is this: do not have any CSS rules that blindly apply to .main
. We had one that set the height in such a way as to render the list items in the suggestion widget with height: 0.
We debugged this by setting a DOM breakpoint, and then inspecting the DOM elements. We needed to use a DOM breakpoint, because the DOM elements were removed when we focused on the devtools window (we had it in a separate window).
Upvotes: 4