-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[api] Ensure completion symbols returned to API always come from the current snapshot #64554
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
Andrew Branch (andrewbranch)
merged 6 commits into
microsoft:main
from
andrewbranch:api-completion-symbols-fix
Sep 30, 2026
+3,555
−1,045
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e0a6e80
Ensure completion symbols returned to API always come from the curren…
andrewbranch c4cb92c
Generate UserPreferences from schema
andrewbranch 3547a0c
PR feedback
andrewbranch 0c49ab6
Merge branch 'main' into api-completion-symbols-fix
andrewbranch a72d18d
Fix inlay-hints test after merging main
andrewbranch 2c2999e
Fix build
andrewbranch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
201 changes: 201 additions & 0 deletions
201
packages/typescript/src/api/userPreferences.generated.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,201 @@ | ||
| // Code generated by gen-preferences from tools/userPreferences.schema.json; DO NOT EDIT. | ||
|
|
||
| export interface CodeLensUserPreferences { | ||
| implementationsCodeLensEnabled?: boolean | undefined; | ||
| implementationsCodeLensShowOnAllClassMethods?: boolean | undefined; | ||
| implementationsCodeLensShowOnInterfaceMethods?: boolean | undefined; | ||
| referencesCodeLensEnabled?: boolean | undefined; | ||
| referencesCodeLensShowOnAllFunctions?: boolean | undefined; | ||
| } | ||
|
|
||
| /** | ||
| * CompletionPreferences contains preferences used while producing completions. | ||
| */ | ||
| export interface CompletionPreferences { | ||
| /** | ||
| * Unless this option is `false`, member completion lists triggered with `.` will include entries | ||
| * on potentially-null and potentially-undefined values, with insertion text to replace | ||
| * preceding `.` tokens with `?.`. | ||
| */ | ||
| includeAutomaticOptionalChainCompletions?: boolean | undefined; | ||
| /** | ||
| * Enables auto-import-style completions on partially-typed import statements. E.g., allows | ||
| * `import write|` to be completed to `import { writeResult } from "./utils.js"`. | ||
| */ | ||
| includeCompletionsForImportStatements?: boolean | undefined; | ||
| /** | ||
| * 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.`. | ||
| */ | ||
| includeCompletionsForModuleExports?: boolean | undefined; | ||
| /** | ||
| * If enabled, completions for class members (e.g. methods and properties) will include | ||
| * a whole declaration for the member. | ||
| */ | ||
| includeCompletionsWithClassMemberSnippets?: boolean | undefined; | ||
| /** | ||
| * If enabled, object literal methods will have a method declaration completion entry in addition | ||
| * to the regular completion entry containing just the method name. | ||
| */ | ||
| includeCompletionsWithObjectLiteralMethodSnippets?: boolean | undefined; | ||
| jsxAttributeCompletionStyle?: "auto" | "braces" | "none" | undefined; | ||
| } | ||
|
|
||
| export interface EditorSettings { | ||
| baseIndentSize?: number | undefined; | ||
| convertTabsToSpaces?: boolean | undefined; | ||
| indentSize?: number | undefined; | ||
| indentStyle?: "none" | "block" | "smart" | undefined; | ||
| newLineCharacter?: string | undefined; | ||
| tabSize?: number | undefined; | ||
| trimTrailingWhitespace?: boolean | undefined; | ||
| } | ||
|
|
||
| export interface FormatCodeSettings extends EditorSettings { | ||
| indentMultiLineObjectLiteralBeginningOnBlankLine?: boolean | undefined; | ||
| indentSwitchCase?: boolean | undefined; | ||
| insertSpaceAfterCommaDelimiter?: boolean | undefined; | ||
| insertSpaceAfterConstructor?: boolean | undefined; | ||
| insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean | undefined; | ||
| insertSpaceAfterKeywordsInControlFlowStatements?: boolean | undefined; | ||
| insertSpaceAfterOpeningAndBeforeClosingEmptyBraces?: boolean | undefined; | ||
| insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean | undefined; | ||
| insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean | undefined; | ||
| insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean | undefined; | ||
| insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean | undefined; | ||
| insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean | undefined; | ||
| insertSpaceAfterSemicolonInForStatements?: boolean | undefined; | ||
| insertSpaceAfterTypeAssertion?: boolean | undefined; | ||
| insertSpaceBeforeAndAfterBinaryOperators?: boolean | undefined; | ||
| insertSpaceBeforeFunctionParenthesis?: boolean | undefined; | ||
| insertSpaceBeforeTypeAnnotation?: boolean | undefined; | ||
| placeOpenBraceOnNewLineForControlBlocks?: boolean | undefined; | ||
| placeOpenBraceOnNewLineForFunctions?: boolean | undefined; | ||
| semicolons?: "ignore" | "insert" | "remove" | undefined; | ||
| } | ||
|
|
||
| export interface InlayHintsPreferences { | ||
| includeInlayEnumMemberValueHints?: boolean | undefined; | ||
| includeInlayFunctionLikeReturnTypeHints?: boolean | undefined; | ||
| includeInlayFunctionParameterTypeHints?: boolean | undefined; | ||
| includeInlayParameterNameHints?: "none" | "literals" | "all" | undefined; | ||
| includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean | undefined; | ||
| includeInlayPropertyDeclarationTypeHints?: boolean | undefined; | ||
| includeInlayVariableTypeHints?: boolean | undefined; | ||
| includeInlayVariableTypeHintsWhenTypeMatchesName?: boolean | undefined; | ||
| } | ||
|
|
||
| /** | ||
| * UserPreferences represents TypeScript language service preferences. | ||
| */ | ||
| export interface UserPreferences extends FormatCodeSettings, CompletionPreferences, InlayHintsPreferences, CodeLensUserPreferences { | ||
| allowRenameOfImportPath?: boolean | undefined; | ||
| allowTextChangesInNewFiles?: boolean | undefined; | ||
| autoClosingTags?: boolean | undefined; | ||
| autoImportEntrypointDirectorySearch?: boolean | undefined; | ||
| autoImportFileExcludePatterns?: string[] | undefined; | ||
| autoImportSpecifierExcludeRegexes?: string[] | undefined; | ||
| /** | ||
| * AutomaticTypeAcquisitionEnabled is the unified setting from tsserver.automaticTypeAcquisition.enabled under the js/ts section. | ||
| * When set, it takes precedence over DisableAutomaticTypeAcquisition. | ||
| */ | ||
| automaticTypeAcquisitionEnabled?: boolean | undefined; | ||
| completeJSDocs?: boolean | undefined; | ||
| /** | ||
| * CustomConfigFileName specifies a custom config file name to use before defaulting to tsconfig.json/jsconfig.json. | ||
| */ | ||
| customConfigFileName?: string | undefined; | ||
| /** | ||
| * DisableAutomaticTypeAcquisition is the deprecated setting from typescript.disableAutomaticTypeAcquisition. | ||
| */ | ||
| disableAutomaticTypeAcquisition?: boolean | undefined; | ||
| disableLineTextInReferences?: boolean | undefined; | ||
| disableSuggestions?: boolean | undefined; | ||
| displayPartsForJSDoc?: boolean | undefined; | ||
| excludeLibrarySymbolsInNavTo?: boolean | undefined; | ||
| formatEnabled?: boolean | undefined; | ||
| generateReturnInDocTemplate?: boolean | undefined; | ||
| /** | ||
| * Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" | ||
| */ | ||
| importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js" | undefined; | ||
| importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative" | undefined; | ||
| lazyConfiguredProjectsFromExternalProject?: boolean | undefined; | ||
| locale?: string | undefined; | ||
| /** | ||
| * A positive integer indicating the maximum length of a hover text before it is truncated. | ||
| * | ||
| * Default: `500` | ||
| */ | ||
| maximumHoverLength?: number | undefined; | ||
| /** | ||
| * Indicates whether accents and other diacritic marks are considered unequal for the purpose of sorting. | ||
| * | ||
| * This preference is ignored if organizeImportsCollation is not `unicode`. | ||
| * | ||
| * Default: `true` | ||
| */ | ||
| organizeImportsAccentCollation?: boolean | undefined; | ||
| /** | ||
| * Indicates whether upper case or lower case should sort first. | ||
| * | ||
| * This permission is ignored if: | ||
| * - organizeImportsCollation is not `unicode` | ||
| * - organizeImportsIgnoreCase is `true` | ||
| * - organizeImportsIgnoreCase is `auto` and the auto-detected case sensitivity is case-insensitive. | ||
| * | ||
| * Default: `false` | ||
| */ | ||
| organizeImportsCaseFirst?: "default" | "lower" | "upper" | undefined; | ||
| /** | ||
| * Indicates whether imports should be organized via an "ordinal" (binary) comparison using the numeric value of their | ||
| * code points, or via "unicode" natural sorting. This implementation is locale-agnostic and approximates the practical | ||
| * import-sorting behavior rather than the full Unicode Collation Algorithm. | ||
| * | ||
| * Default: Ordinal | ||
| */ | ||
| organizeImportsCollation?: "ordinal" | "unicode" | undefined; | ||
| /** | ||
| * Indicates whether imports should be organized in a case-insensitive manner. | ||
| * | ||
| * If unspecified, case sensitivity is detected. | ||
| */ | ||
| organizeImportsIgnoreCase?: boolean | undefined; | ||
| /** | ||
| * Indicates the locale to use for "unicode" collation in legacy clients. This is accepted for compatibility, but | ||
| * currently ignored because organize-import sorting is deterministic and locale-agnostic. | ||
| * | ||
| * This preference is ignored if organizeImportsCollation is not `unicode`. | ||
| * | ||
| * Default: `"en"` | ||
| */ | ||
| organizeImportsLocale?: string | undefined; | ||
| /** | ||
| * Indicates whether numeric collation should be used for digit sequences in strings. When `true`, will collate | ||
| * strings such that `a1z < a2z < a100z`. When `false`, will collate strings such that `a1z < a100z < a2z`. | ||
| * | ||
| * This preference is ignored if organizeImportsCollation is not `unicode`. | ||
| * | ||
| * Default: `false` | ||
| */ | ||
| organizeImportsNumericCollation?: boolean | undefined; | ||
| /** | ||
| * Indicates which deterministic preset should be used to sort imports. | ||
| * "auto" detects the existing ordinal case sensitivity where possible. | ||
| */ | ||
| organizeImportsSort?: "auto" | "ordinal" | "ordinalIgnoreCase" | "natural" | "naturalIgnoreCase" | undefined; | ||
| /** | ||
| * Indicates where named type-only imports should sort. "inline" sorts named imports without regard to if the import is type-only. | ||
| * | ||
| * Default: `auto`, which defaults to `last` | ||
| */ | ||
| organizeImportsTypeOrder?: "auto" | "last" | "inline" | "first" | undefined; | ||
| preferGoToSourceDefinition?: boolean | undefined; | ||
| preferTypeOnlyAutoImports?: boolean | undefined; | ||
| providePrefixAndSuffixTextForRename?: boolean | undefined; | ||
| provideRefactorNotApplicableReason?: boolean | undefined; | ||
| quotePreference?: "auto" | "double" | "single" | undefined; | ||
| reportStyleChecksAsWarnings?: boolean | undefined; | ||
| validateEnabled?: boolean | undefined; | ||
| workspaceSymbolsScope?: "allOpenProjects" | "currentProject" | undefined; | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.