-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Add 'disableSuggestions' to UserPreferences #23283
Conversation
@sheetalkamat If I comment out the new test, the failures in the other tsserverProjectSystem tests go away -- any idea how these are effecting each other? |
looking |
@andy-ms this is i think because of https://github.com/Microsoft/TypeScript/blob/master/src/server/editorServices.ts#L1849 |
Ugh, every property in |
@sheetalkamat Good to go? |
@@ -398,14 +398,14 @@ namespace ts.server { | |||
if (!this.formatSettings) { | |||
this.formatSettings = getDefaultFormatCodeSettings(this.host); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function returns a copy, so it is ok to modify .. So no need to clone unlike defaultPreferences... I am not sure how many times we call these configure function to say if its ok to clone the object (esp with such a big set of properties)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
src/server/scriptInfo.ts
Outdated
assign(this.formatSettings, formatSettings); | ||
} | ||
else { | ||
this.formatSettings = mergeMapLikes(this.formatSettings, formatSettings); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is not this just:
this.formatSettings = { ... this.formatSettings, ...formatSettings};
CC @mjbvz This should be added as a vscode setting. |
Fixes #23177