ChristianKohler / NpmIntellisense

Visual Studio Code plugin that autocompletes npm modules in import statements
MIT License
155 stars 43 forks source link

Enhancement: Ignore specific npm modules #82

Open christo8989 opened 2 years ago

christo8989 commented 2 years ago

I want to be able to ignore a node module from intellisense / autocomplete.

I like to follow the Clean Code idea of plugging in third party code. So I like to create my own module to export a third party.

utilities/css.ts

import styled from 'styled-components';

export { styled };

App.tsx

const AppStyled = styled.div`
  text-align: center;
`

When I autocomplete the import for styled, I get the option styled: styled-components instead of styled: ./utilities/css.ts. Not only that, the styled-components import actually hides the file import.

App.tsx (Goal with autocomplete)

import { styled } from './utilities/css';

const AppStyled = styled.div`
  text-align: center;
`

Could there be an enhancement to ignore certain modules from autocomplete?

ChristianKohler commented 2 years ago

How do you autocomplete? Could you describe your steps or upload a small video?