Skip to content
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

fix: make "suggest.autoImports" to switch completions from external modules #19845

Merged
merged 2 commits into from
Aug 2, 2023
Merged

fix: make "suggest.autoImports" to switch completions from external modules #19845

merged 2 commits into from
Aug 2, 2023

Conversation

kyoh86
Copy link
Contributor

@kyoh86 kyoh86 commented Jul 15, 2023

What's the bug?

The suggest.auto_imports should suppress autocomplete suggestions for symbols that is not imported.
But now it is passed to include_completions_for_import_statements, that tells tsc to do autocomplete for the import statement or not.

It causes the bug described in #15488.

What's fix in this PR?

I make the suggest.auto_imports be passed to the right option include_completions_for_module_exports that tells tsc to not take suggestions for symbols from modules that is not imported.

Fix #15488

Screenshots (after this PR)

I'm using denols with nvim-lspconfig.

If the suggest.autoImports is true (default),

deno ls returns suggestions from modules that is not imported.

If the suggest.autoImports is false,

deno ls returns only suggestions from modules that has already imported.

@CLAassistant
Copy link

CLAassistant commented Jul 15, 2023

CLA assistant check
All committers have signed the CLA.

@kyoh86 kyoh86 marked this pull request as ready for review July 15, 2023 12:41
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@dsherret dsherret merged commit 9fa328f into denoland:main Aug 2, 2023
11 checks passed
@kyoh86 kyoh86 deleted the fix-suggest-auto-imports branch August 2, 2023 15:20
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.

lsp: cannot disable Deno auto import or auto discovery
3 participants