Skip to content

Don't pass deprecated options to Completion request #233

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 3 commits into from
Aug 8, 2021

Conversation

rchl
Copy link
Member

@rchl rchl commented Jul 5, 2021

The deprecated options "includeExternalModuleExports" and "includeInsertTextCompletions" are now passed as global, non-deprecated typescript preferences.

To achieve that, added those as default preferences to the preferences object that the user can override.

Also switch to non-deprecated "CompletionInfo" request and handle "isIncomplete" flag (it is used when suggesting global import completions when includeCompletionsForImportStatements and includeCompletionsWithInsertText typescript preferences are enabled) and fix some Completion-related types (use LSP types instead of TSC types).

@apexskier

The deprecated options "includeExternalModuleExports" and "includeInsertTextCompletions"
are now passed as global, non-deprecated typescript preferences.

To achieve that, added those as default preferences to the preferences
object that the user can override.

Also switch to non-deprecated "CompletionInfo" request and handle
"isIncomplete" flag (I don't know when typescript actually makes that
"true") and fix some Completion-related types (use LSP types instead of
TSC types).
@rchl
Copy link
Member Author

rchl commented Jul 5, 2021

Now I've realized why the TSCompletionItem type existed (it adds extra type information to the data object. It would be useful to keep that so I'll look at that part more.

@rchl rchl marked this pull request as draft July 5, 2021 21:34
@rchl
Copy link
Member Author

rchl commented Jul 6, 2021

Now I've realized why the TSCompletionItem type existed (it adds extra type information to the data object. It would be useful to keep that so I'll look at that part more.

Well, it's fine for data to be untyped in most cases. Still using TSCompletionItem type in asCompletionItem where data is actually set.

@rchl rchl marked this pull request as ready for review July 6, 2021 19:14
Copy link
Collaborator

@DonnieWest DonnieWest left a comment

Choose a reason for hiding this comment

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

LGTM

@DonnieWest DonnieWest merged commit aeb13c7 into master Aug 8, 2021
@DonnieWest DonnieWest deleted the fix/completion-prefs branch August 8, 2021 00:07
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