Skip to content

Exclude packages from intellisense #54135

Closed
@thany

Description

@thany

I'd like to excludes packages (whether from @types or not) from intellisense.

Use-case: in a Next.js project, you'll have typings for Node.js. And then even when you're not in server context, but instead are writing typescript meant to run in the browser, typing log will yield:

image

That's annoying, and you'd almost never want that one anyway. Not even when writing serverside code.

I've tried fiddling with tsconfig to no avail, looking around in editor.suggestions settings, but there's only options for reordering. I would like a way to exclude stuff there.

In this particular case, I would like to exclude the console package, or maybe just all Node.js related packages.

Current workaround is to use the setting "editor.snippetSuggestions": "top".
This achieves the goal of being able to go l o g Enter and end up writing a console.log( );

But it's only a workaround, because the offending package is still there, and this problem might very well occur for other suggestions. I guess the bottomline is, I don't want suggestions for Node.js packages when writing browser code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionAn issue which isn't directly actionable in code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions