Skip to content

LSP picks up @types/* package only with "manual" node_modules dir handling #27215

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

Closed
bartlomieju opened this issue Dec 3, 2024 · 0 comments · Fixed by #28185
Closed

LSP picks up @types/* package only with "manual" node_modules dir handling #27215

bartlomieju opened this issue Dec 3, 2024 · 0 comments · Fixed by #28185
Assignees
Labels
bug Something isn't working correctly dx lsp related to the language server

Comments

@bartlomieju
Copy link
Member

bartlomieju commented Dec 3, 2024

Version: Deno 2.1.2

When working on a project with the Deno LSP, Deno it not picking up @types/* package automatically, unless nodeModulesDir setting is set to "manual". That means in situation when nodeModulesDir is explicitly set to "auto", the typings for npm packages are not found automatically.

With no nodeModulesDir or with nodeModulesDir set to `"manual":
Screenshot 2024-12-03 at 15 44 25

With nodeModulesDir set to "auto":
Screenshot 2024-12-03 at 15 44 53

In other words the LSP should look inside node_modules directory for @types/* packages and always use them if they are available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly dx lsp related to the language server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants