-
Notifications
You must be signed in to change notification settings - Fork 303
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
Color swatch preview is shown even if commented out #2167
Comments
Yeah, I noticed this too. It's because the colour detection we do is pretty naive and just regex's the file. We don't really know (in the editor) what's a comment and what's not. I think the best fix for this would be to move this to the server (probably as an LSP custom message once we've moved the editor fully over to LSP). |
This might not need to be a custom message, as LSP may have support for it already: |
This is definitely a nit. I wouldn't mind at all if you closed it. |
I'll keep this issue open as a reminder that I need to implement this in LSP anyway (and can use the API above), whether or not it ends up with the same quirk :-) |
If/when moving this to LSP, we should try to make it pick the Colors class more reliably too (see #2857). |
The built-in color picker is now supported via the LSP server. It's a change in the SDK so will show up in a future SDK release rather than Dart-Code release. When the SDK you're using supports this, the legacy color previews will be disabled, so this problem will go away (since the server-generated are more reliable and not using regex). |
The text was updated successfully, but these errors were encountered: