-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Support services settings #22236
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
Support services settings #22236
Changes from 2 commits
a40fab8
590faf0
4d592ee
327d688
700b7e7
85b8abc
c0e2d52
e8033dc
940979a
ca0beaf
b06b0d8
6e1adaf
abc1000
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1232,6 +1232,8 @@ namespace ts.server.protocol { | |
*/ | ||
formatOptions?: FormatCodeSettings; | ||
|
||
options?: Options; | ||
|
||
/** | ||
* The host's additional supported .js file extensions | ||
*/ | ||
|
@@ -1707,15 +1709,13 @@ namespace ts.server.protocol { | |
*/ | ||
prefix?: string; | ||
/** | ||
* If enabled, TypeScript will search through all external modules' exports and add them to the completions list. | ||
* This affects lone identifier completions but not completions on the right hand side of `obj.`. | ||
* @deprecated Use Options | ||
*/ | ||
includeExternalModuleExports: boolean; | ||
includeExternalModuleExports?: boolean; | ||
/** | ||
* If enabled, the completion list will include completions with invalid identifier names. | ||
* For those entries, The `insertText` and `replacementSpan` properties will be set to change from `.x` property access to `["x"]`. | ||
* @deprecated Use Options | ||
*/ | ||
includeInsertTextCompletions: boolean; | ||
includeInsertTextCompletions?: boolean; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like we have two separate names for the same concept (i.e. different thing in protocol vs services) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a deprecated property of |
||
} | ||
|
||
/** | ||
|
@@ -2588,6 +2588,20 @@ namespace ts.server.protocol { | |
insertSpaceBeforeTypeAnnotation?: boolean; | ||
} | ||
|
||
export interface Options { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
quote: "double" | "single"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these should be all be optional. |
||
/** | ||
* If enabled, TypeScript will search through all external modules' exports and add them to the completions list. | ||
* This affects lone identifier completions but not completions on the right hand side of `obj.`. | ||
*/ | ||
includeExternalModuleExports: boolean; | ||
/** | ||
* If enabled, the completion list will include completions with invalid identifier names. | ||
* For those entries, The `insertText` and `replacementSpan` properties will be set to change from `.x` property access to `["x"]`. | ||
*/ | ||
includeInsertTextCompletions: boolean; | ||
} | ||
|
||
export interface CompilerOptions { | ||
allowJs?: boolean; | ||
allowSyntheticDefaultImports?: boolean; | ||
|
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.
not sure why should these be lumped with the other... i mean we can change to a global config system, but maybe on a separate change, and then we need to discuss that as well with the VSCode folks and with @amcasey
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.
Spoke to @amcasey and seems like it will work for him. so i am fine with he change. we probably need to give them more descriptive names.
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.
Wouldn't changing the name be a breaking change though? Although we could deprecate the existing name and add an equivalent one.
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.
I think @mhegazy meant that we should give them more descriptive names in their new location. In their old location, they have to stay as-is for back-compat.
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.
@amcasey Do you have some good suggestions for the new names?
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.
I had envisioned that they would be in a nested object called (e.g.) "completions". However, if that's not idiomatic, incorporating "completions" into the name should be sufficient - e.g. "includeCompletionsForExternalModuleExports".