Skip to content

Refactor to setupConfigure for #2388 #2389

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

Merged
merged 4 commits into from
Oct 30, 2020

Conversation

yoyo930021
Copy link
Member

@yoyo930021 yoyo930021 commented Oct 16, 2020

Fixed #2388

It also conveniently fixes a problem where incorrect settings could be imported.

@yoyo930021 yoyo930021 force-pushed the refactor-setup-config branch 2 times, most recently from 4a9b3a6 to 95cce5c Compare October 16, 2020 11:42
@yoyo930021 yoyo930021 marked this pull request as draft October 17, 2020 04:05
@yoyo930021 yoyo930021 marked this pull request as ready for review October 17, 2020 09:31
@octref octref force-pushed the refactor-setup-config branch from 8e194ba to 2b2b176 Compare October 30, 2020 02:09
Copy link
Member

@octref octref left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@octref octref merged commit 21619b2 into vuejs:master Oct 30, 2020
@rchl
Copy link
Collaborator

rchl commented Nov 6, 2020

I'd like to better understand the changes done here to fix it properly in #2436.

Why was it not enough to run setupDynamicFormatters() from onDidChangeConfiguration notification?

Sending it when handling the initialize request, as done here, is too early.

We could send it from initialized but I'm not sure why from onDidChangeConfiguration() was not enough since the client is pretty much guaranteed to send it early after initialize.

Was the problem more related to passing a partial config to setupDynamicFormatters?

@yoyo930021
Copy link
Member Author

I'd like to better understand the changes done here to fix it properly in #2436.

Why was it not enough to run setupDynamicFormatters() from onDidChangeConfiguration notification?

Sending it when handling the initialize request, as done here, is too early.

We could send it from initialized but I'm not sure why from onDidChangeConfiguration() was not enough since the client is pretty much guaranteed to send it early after initialize.

Was the problem more related to passing a partial config to setupDynamicFormatters?

I think it's a try.
My first suspicion was that it wouldn't be triggered onDidChangeConfiguration on startup.
I guess we could rollup back this part.

@rchl
Copy link
Collaborator

rchl commented Nov 6, 2020

OK, good. That means I can probably safely revert that logic. Thanks.

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.

Vetur auto formatting not working on .vue files until disabled and then re-enabled in preferences
3 participants