monaco-editor icon indicating copy to clipboard operation
monaco-editor copied to clipboard

Is there a way to show example code or hint ?

Open chenjunweii opened this issue 6 years ago • 1 comments

I have tried using CompletionItem to show example code, but CompletionItem seems to support only single-line text. when I add \n to the CompletionItem , it shows Enter icon when the suggestions pop up

I also tried using detail and documentation in CompletionItem, but that is a two-step action, which clicking with the mouse is required

I've tried the example in the playground, "Configure Javascript Defaults", but it seems to support javascript, and the language I would like to use in monaco-editor is SQL,

so I am wondering if there is another way to do it ? thanks

chenjunweii avatar May 22 '20 03:05 chenjunweii

I also tried using detail and documentation in CompletionItem, but that is a two-step action, which clicking with the mouse is required

@chenjunweii If you use Control+Space, the documentation text will appear. I'm on a Mac keyboard here so can't confirm what the keybinding would be on Windows and Linux.

rcjsuen avatar May 22 '20 09:05 rcjsuen