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

show defaultColorDecorators in documents decorated by extensions #182214

Closed
olets opened this issue May 11, 2023 · 13 comments · Fixed by #235389
Closed

show defaultColorDecorators in documents decorated by extensions #182214

olets opened this issue May 11, 2023 · 13 comments · Fixed by #235389
Assignees
Labels
editor-color-picker Editor color picker widget issues feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders verification-needed Verification of issue is requested
Milestone

Comments

@olets
Copy link

olets commented May 11, 2023

If an extension decorates a document, none of document's defaultColorDecorators are shown.

A helpful enhancement would be to use the union of defaultColorDecorators and extension-provided decorators. Whereas currently the defaultColorDecorators are default at the document level, they would be default at the token level. So tokens with defaultColorDecorators decoration definitions and no decoration definitions from extensions would be decorated by the defaultColorDecorators.

@aeschli
Copy link
Contributor

aeschli commented May 12, 2023

The idea is that contributed color providers have real language knowledge and know about the valid color formats and locations.

Maybe the tailwind extension is missing a color and should fix that?

@gyurielf
Copy link

The idea is that contributed color providers have real language knowledge and know about the valid color formats and locations.

Maybe the tailwind extension is missing a color and should fix that?

@bradlc possibly can answer this.

@olets
Copy link
Author

olets commented May 15, 2023

We may be misunderstanding each other. My request is that extensions be able to extend a given language's default color decorators. Is it correct that currently if a user installs an extension which adds decorators to a given language, only the decorators contributed by the extension are used by VS Code for that language?

@aeschli
Copy link
Contributor

aeschli commented May 15, 2023

The color ranges of all extensions are combined. So it's possible to write an extension that adds additional color ranges.

However, defaultColorDecorators are only used when there is no extension that provides color ranges for the given document.

@olets
Copy link
Author

olets commented May 15, 2023

Thanks!

In those terms, my feature request is to have defaultColorDecorators' color ranges included in the combined color range for a language even when an extension provides color ranges for that language. It could be an additional option, or always when editor.defaultColorDecorators is true.

At a minimum, revising the label in the settings' GUI to include cover your "however" could help users know what to expect. (In my case, it would have helped me understand why toggling on the new option resulted in default decorators appearing only until extensions were fully loaded.)

@gyurielf
Copy link

gyurielf commented May 15, 2023

Related (or duplicated):
#182534

@aiday-mar aiday-mar added editor-color-picker Editor color picker widget issues feature-request Request for new features or functionality labels May 22, 2023
@vscodenpa vscodenpa added this to the Backlog Candidates milestone May 22, 2023
@vscodenpa
Copy link

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@vscodenpa
Copy link

🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@olets
Copy link
Author

olets commented Dec 5, 2024

Excited to see activity here! Looks like the issue was closed prematurely by PR keyword. Could we reopen until the change is released? cc @aiday-mar

@aiday-mar
Copy link
Contributor

The change will be released tomorrow in Insiders :) and soon in stable

@vs-code-engineering vs-code-engineering bot added insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Dec 6, 2024
@rzhao271 rzhao271 modified the milestones: Backlog, November 2024 Dec 6, 2024
@rzhao271 rzhao271 added the verification-needed Verification of issue is requested label Dec 6, 2024
@dbaeumer
Copy link
Member

dbaeumer commented Dec 8, 2024

@aiday-mar The PR got merged into main so I assume this goes into January and not November. Please ping if this is uncorrect and open a candidate issue if this is something for November.

@dbaeumer dbaeumer modified the milestones: November 2024, January 2025 Dec 8, 2024
@aiday-mar
Copy link
Contributor

aiday-mar commented Dec 9, 2024

Hi @dbaeumer yes January is correct

@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Jan 19, 2025
@aiday-mar
Copy link
Contributor

aiday-mar commented Jan 27, 2025

To verify:

  • find the setting editor.defaultColorDecorators
  • check that the setting has three values and that changing the value makes the decorators work as described in the settings

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-color-picker Editor color picker widget issues feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders verification-needed Verification of issue is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants