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

How to support CompletionItemKind#Color in LSP client completion? #1398

Open
angelozerr opened this issue Jan 9, 2024 · 2 comments
Open
Labels
feature-request Request for new features or functionality
Milestone

Comments

@angelozerr
Copy link

angelozerr commented Jan 9, 2024

The CSS language server returns CompletionItemKind#Color:

image

But I wonder how to interpret this Color in LSPclient side to show in completion the proper color like you did on vscode side.

It seems that LSP client should interpret the color name (ex: red), hexadecimal color (ex : #FFFFF) etc, is it the right direction?

@dbaeumer
Copy link
Member

dbaeumer commented Jan 9, 2024

This is actually a hack in VS Code itself. It interprets the details property and if this is a hexadecimal color value it takes that value to render the box. There is a VS Code issue to make this more friendly.

@dbaeumer dbaeumer added this to the Backlog milestone Jan 9, 2024
@dbaeumer dbaeumer added the feature-request Request for new features or functionality label Jan 9, 2024
@dbaeumer
Copy link
Member

dbaeumer commented Jan 9, 2024

See microsoft/vscode#166201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

2 participants