Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JSON] Show title/description in Completion #1831

Closed
WhileTrueEndWhile opened this issue Feb 12, 2020 · 3 comments
Closed

[JSON] Show title/description in Completion #1831

WhileTrueEndWhile opened this issue Feb 12, 2020 · 3 comments
Assignees
Labels

Comments

@WhileTrueEndWhile
Copy link

WhileTrueEndWhile commented Feb 12, 2020

Feature Request

I use monaco with the great JSON plugin and a JSON schema.

Using the following schema...

{
    "oneOf": [
        {
            "title": "Title1",
            "enum": ["value1"],
            "default": "value1",
            "readOnly": true
        },
        {
            "title": "Title2",
            "enum": ["value2"],
            "default": "value2",
            "readOnly": true
        },
        {
            "title": "Title3",
            "enum": ["value3"],
            "default": "value3",
            "readOnly": true
        }
    ]
}

... monaco offers the following completion options:

value1
value2
value2

Is it possible to show title/description beside it, like...

value1    Title1
value2    Title2
value3    Title3

...?

Thanks in advance.


Notes:

  • It's already implemented for HoverAdapter
  • It works for description for one item at a time

Related code:

CompletionAdapter


Related issues:

#727
#1798

@aeschli
Copy link
Contributor

aeschli commented Feb 18, 2020

Note: You can already do that:

        {
            "description": "Use it for foo",
            "const": "value1",
            "readOnly": true
        },

The description shows as a extra tooltip when the proposal is selected (press ctrl+space while the suggesion widget is up to always see the tooltip)

@WhileTrueEndWhile
Copy link
Author

Thank you very much. It seems to work with description. I thought I would be possible to show this label for all items at once (right-justified). Maybe it's unsupported by vscode.

@WhileTrueEndWhile
Copy link
Author

Thank you, I think it's unsupported by vscode to show all descriptions at once.
Please let me know if I'm wrong.
I'm sorry for the noisy thread.

@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants