denoland / vscode_deno

Visual Studio Code plugin for Deno
https://marketplace.visualstudio.com/items?itemName=denoland.vscode-deno
MIT License
1.5k stars 146 forks source link

Auto-import suggestions for npm libraries are not provided #1177

Closed itsMapleLeaf closed 2 weeks ago

itsMapleLeaf commented 1 month ago

Describe the bug

These symbols come from the libraries imported above, but none of them have auto-import suggestions.

It's very spotty; some libraries have suggestions, and others don't, but I don't see a clear correlation yet.

To Reproduce

deno.json:

{
    "nodeModulesDir": "auto"
}

package.json

{
    "type": "module",
    "dependencies": {
        "@react-router/dev": "^7.0.0-pre.0",
        "react-router": "^6.27.0-pre.1",
        "react-router-dom": "^6.27.0-pre.1"
    }
}
  1. Run deno install
  2. Try to auto-import symbols from installed libraries

Expected behavior

It should provide suggestions to auto-import symbols from libraries, ideally those that haven't been referenced in a project yet, something that the vanilla TS server could do for a while.

Screenshots

Versions

Version: 1.94.2 (user setup) Commit: 384ff7382de624fb94dbaf6da11977bba1ecd427 Date: 2024-10-09T16:08:44.566Z Electron: 30.5.1 ElectronBuildId: 10262041 Chromium: 124.0.6367.243 Node.js: 20.16.0 V8: 12.4.254.20-electron.0 OS: Windows_NT x64 10.0.22631

deno: 2.0.0+ccdbeb4 extension: v3.41.1