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

Fix semantic highlighting #689

Merged
merged 1 commit into from
Jan 11, 2023

Conversation

fhammerschmidt
Copy link
Member

This workaround brings back semantic highlighting until the referenced PR in #686 gets merged.

@zth
Copy link
Collaborator

zth commented Jan 11, 2023

What does documentSelector actually do and why do we need it to be null? And why does it work as we want without setting it? 😄

@fhammerschmidt
Copy link
Member Author

fhammerschmidt commented Jan 11, 2023

A documentSelector is a list of filters to narrow the scope of the extension to e.g. a language. Which we do on the client side anyway.

The most recent version of vscode-languageserver-node however broke the precedence between client and server configuration. According to its documentation the client options should be used if the server's is null but that is not the current behaviour. Until the PR in the comment gets merged at least.

So I figured, why not just comment it out on the server? And it works.

@fhammerschmidt
Copy link
Member Author

I just checked again and I now saw that they already did a fix:
microsoft/vscode-languageserver-node@8e9709d

Maybe we should just wait for their next version then.

@zth
Copy link
Collaborator

zth commented Jan 11, 2023

Can't we just use the client configuration in the server too then? Ie add what we have there instead of null?

@fhammerschmidt
Copy link
Member Author

Yes, you are right that fixes it as well. I updated the PR accordingly.

@zth zth merged commit 9c6d2dd into rescript-lang:master Jan 11, 2023
@fhammerschmidt fhammerschmidt deleted the fix-semantic-highlight branch January 11, 2023 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants