Skip to content
This repository has been archived by the owner on Jun 30, 2024. It is now read-only.

Bump version of vscode-css-languageservice to 5.1.4 #333

Merged

Conversation

florianbuehler
Copy link
Contributor

Currently the syntax highlighting is not working for some of the newer CSS entities (e.g. accent-color).

This is because accent-color was only added in vscode-custom-data@0.3.5 and that package version is only used since vscode-css-languageservice@5.1.4. Therefore simply upgrading the package version will fix that issue.

@jasonwilliams
Copy link
Collaborator

@florianbuehler are you sure this fixes your issue?
We don’t use the language service for syntax highlighting it’s used for intellisense.

can you show a before and after screenshot?

@jasonwilliams
Copy link
Collaborator

jasonwilliams commented Nov 14, 2021

For updating syntax see https://github.com/styled-components/vscode-styled-components/blob/master/CONTRIBUTING.md#adding-syntax

For an example see my “fix urls” PR
#323

We extend from the builtin VSCode css syntaxes file so take a look here to see what you need https://github.com/microsoft/vscode/blob/main/extensions/css/syntaxes/css.tmLanguage.json

the first thing I would do is search for “accent-Color” in that file I linked and see how it matches up with our syntax file (i.e where should it be)

@florianbuehler
Copy link
Contributor Author

@jasonwilliams thank you for the hint! You are right, bumping the package version is not fixing the highlighting:

current:
current - highlighting
fix:
fix - highlighting

@florianbuehler
Copy link
Contributor Author

But the upgrade is necessary to fix the missing autocomplete:

current:
current - autocomplete

fix:
fix - autocomplete
fix - description

@florianbuehler
Copy link
Contributor Author

I will also look into https://github.com/microsoft/vscode/blob/main/extensions/css/syntaxes/css.tmLanguage.json so we also get the color highlighting :)

@jasonwilliams
Copy link
Collaborator

But the upgrade is necessary to fix the missing autocomplete:

current: current - autocomplete

fix: fix - autocomplete fix - description

That’s actually quite interesting, I didn’t expect our version to be having an affect on the typescript plugin.

https://github.com/microsoft/typescript-styled-plugin/blob/main/package-lock.json#L12

Maybe it does need bumping after all

@jasonwilliams
Copy link
Collaborator

I’m going to merge this and we should continue discussion in the issue

@jasonwilliams jasonwilliams merged commit ae606d4 into styled-components:master Nov 15, 2021
@jasonwilliams
Copy link
Collaborator

I thought there was an issue for syntax highlighting but there isn’t, feel free to make one @florianbuehler

@florianbuehler
Copy link
Contributor Author

@jasonwilliams I just opened one: #335

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants