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

feat(lsp): auto-imports with @deno-types directives #26821

Open
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

nayeemrmn
Copy link
Collaborator

Closes denoland/vscode_deno#1204.

Inserts // @deno-types=... for auto-import completions. These suggestions are sourced from other @deno-types usages and "jsxImportSourceTypes" in deno.json.

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 (once it compiles)

@dsherret
Copy link
Member

@nayeemrmn I can update this PR with main. I caused some conflicts.

code_specifier,
&range,
// todo(dsherret): this is wrong because it doesn't consider CJS referrers
deno_package_json::NodeModuleKind::Esm,
Copy link
Member

@dsherret dsherret Nov 14, 2024

Choose a reason for hiding this comment

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

@nayeemrmn note that this isn't always correct for CJS referrers, but it's probably fine to merge.

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.

auto-import imports from @types package
2 participants