-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Allow CompletionItem.detail to show syntax coloring #34188
Comments
@jrieken Can you please take a look at these proposals and let me know if you have any feedback or another idea of how this could be implemented |
I'm not sure if this should be a separate issue, but what about applying the same solution to |
@KamasamaK The UI that shows labels is really minimal and the idea of the label is to be not much more than a single word. What is your use-case? |
@jrieken Are you referring to the UI for Here are examples from VS Code's TypeScript extension: |
Moving out of October as this needs some more thought. @jrieken brought up some concerns:
|
(from #106862 (comment)) I actually don't think that we want this. Today, details show inline with the item label or atop the documentation. We cannot render markdown as inline label which would mean no-details for markdown-style-details which then would make then just like documentation. So, the low hanging thing is to use the documentation property which does support markdown and then either leave out details or have some plain text in there. Also, we have plans for richer labels that allow to show things like label, signature, qualifier, and type (#39441). With that details would only be shown in the details panels and when omitted it isn't shown. |
@jrieken Is that actually planned out for a release? |
@kjeremy Do you mean #39441? The work is kinda done tbh. There is some API finalisation mostly around the question if we should name those label parts with "programming terms" like signature, qualifier, and type or if we should use generic terms like description, detail etc. What has hold us back is TS being unable to implement this and therefore us being unable to selfhost/verify this |
Feature request
Provide an api for syntax coloring the
.detail
section in aCompletionItem
. For example, in:The
function alert(message?: any): void
text would be colorized astypescript
code.Two possible ideas on how this could be implemented:
Proposal 1
Allow detail to be a
MarkdownString
Pros
Cons
Proposal 2
Add a new language field for the detail string:
Pros
Cons
I'm more in favor of something along the lines of the second proposal
The text was updated successfully, but these errors were encountered: