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

[Feature Request] Provide more elegant 'Enable suggestion details by default'

Open PisecesPeng opened this issue 3 years ago • 0 comments

Context

  • [X] This issue is not a bug report. (please use a different template for reporting a bug)
  • [ ] This issue is not a duplicate of an existing issue. (please use the search to find existing issues)

Description

Hi! this question or feature has been mentioned before, but the solution is not very convenient...

See #2316 (Enable suggestion details by default) See #2241 (ExpandSuggestionDocs Settings conflict with the command panel)

Actually, I have tried a few methods and they all work.

editorDidMount={(mountEditor) => {
    const { widget } = mountEditor.getContribution('editor.contrib.suggestController');
    if (widget) {
        const suggestWidget = widget.value;
        // enable suggestion details by default
        // method 1
        suggestWidget._setDetailsVisible(true);
        // method 2
        suggestWidget._storageService = {
            ...suggestWidget._storageService,
            getBoolean(key) {
                return true;
            },
        }
    }
}

but, this may not work in a future version... so, can be exposed in a configurable way to configure or otherwise?

Thanks!

PisecesPeng avatar Jul 27 '22 03:07 PisecesPeng