Jolan
Jolan•4w ago

LSP auto-import in workspaces

What ? The Deno LSP seems to partially work in a workspace context. I've made a GitHub repository that can help you reproduce the issue: https://github.com/aburii/hono-backend Basically you want to have auto imports resolving to your deno.json's name property but it struggles to do so. Sometimes it will, sometimes it won't (mostly won't). -> go to: image 1 I've notficed that the auto-fix feature does not resolve aswell (might be a all-in-one issue). -> go to: image 2 & 3 Anyone expieriencing the same ? I've noticed some issues on GitHub that are now closed but don't bring any clear solutions. Which versions am I on ? Deno : deno 2.5.4 VSCode plugin : denoland.vscode-deno 3.46.1 TypeScript : 5.9.2
GitHub
GitHub - aburii/hono-backend
Contribute to aburii/hono-backend development by creating an account on GitHub.
No description
No description
No description
5 Replies
PhinehasB
PhinehasB•4w ago
Same issue here @Jolan . Suggestion during manual import seems to work when you get to specifying the path.
Jolan
JolanOP•4w ago
Yep to a certain depth, you might want to import something like @scope/package/interfaces and the suggestion stops at the package level By the way, adding package.json files (since deno 2 handles it) and naming and exporting plus importing your local dependencies by package.json files makes it work. Not sure that is what we want tho
Antonio Sampaio
Antonio Sampaio•2w ago
I got this at the start of a port to deno from nodejs and it seems to be partially fixed i can import from workspace members but it also show relative imports
No description
Jolan
JolanOP•2w ago
might be because you still have package.json files, which as I said resolves the issue atm. The core issue is not about something that does not work, it does not work as good as others do and most of the plugins and the LSP is lost at random moments. Especially on a larger scale. I strongly recommend you to test it in the repository I provided and limit test the LSP 😄
Antonio Sampaio
Antonio Sampaio•7d ago
might be because you still have package.json files, which as I said resolves the issue atm.
theres no package.json in my repo

Did you find this page helpful?