pmizio / typescript-tools.nvim

⚡ TypeScript integration NeoVim deserves ⚡
MIT License
1.35k stars 40 forks source link

Auto imports don't work on monorepos when using yarn pnp #282

Open Arthur944 opened 1 month ago

Arthur944 commented 1 month ago

Problem: When using a monorepo with yarn pnp, the auto import code action never lists options for other packages within the monorepo.

Here's a rerpoduction repository: https://github.com/Arthur944/typescript-tools-repro

(This happened on an M3 Macbook)

Arthur944 commented 1 month ago

Never mind, I just needed an "include": ["src", "../common/src"] in my packages/frontend/tsconfig.json

Arthur944 commented 1 month ago

Actually, my original reproduction was incorrect, but the issue does exist. The current state of the reproduction repository shows the auto imports not working, and the branch "working-with-bun" shows the same code, just with yarn replaced with bun. On that branch auto imports work correctly.

Arthur944 commented 1 month ago

Looks like it might be an issue in yarn itself https://github.com/yarnpkg/berry/issues/3999