Skip to content
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

How to turn off or configure snippet import #4588

Open
laterdayi opened this issue Jul 15, 2024 · 10 comments
Open

How to turn off or configure snippet import #4588

laterdayi opened this issue Jul 15, 2024 · 10 comments
Labels
feature request Request new features

Comments

@laterdayi
Copy link

What problem does this feature solve?

! [image] (https://github.com/user-attachments/assets/cefc01ef-5470-488a-9ed6-dfd73faa7c27)

How to turn off or configure snippet import

I currently have a global snippet, but the plugin will import some node_modules snippets, can I configure or cancel it?

What does the proposed solution look like?

I currently have a global snippet, but the plugin will import some node_modules snippets, can I configure or cancel it?

@laterdayi laterdayi added the feature request Request new features label Jul 15, 2024
@RayGuo-ergou
Copy link
Contributor

Don't include node_module in your tsconfig or set "skipLibCheck": true

@laterdayi
Copy link
Author

Don't include node_module in your tsconfig or set "skipLibCheck": true

Looking at the name is to prohibit package checking, does that mean there is some other effect besides not importing code snippets? Can you list them?

@laterdayi
Copy link
Author

laterdayi commented Jul 16, 2024

image

That doesn't seem to work

@laterdayi
Copy link
Author

@RayGuo-ergou
Copy link
Contributor

skipLibCheck means don't check declare files inside node_modules, I suspected you included files like **/*.ts but from the screenshot it seems correct.

Can you share a reproduction repo?

@laterdayi
Copy link
Author

https://github.com/laterdayi/tests Thank you for your help, after running in vue or js file, enter cl will appear node_Modules code snippet

@RayGuo-ergou
Copy link
Contributor

RayGuo-ergou commented Jul 16, 2024

I think the type is not exposed (e.g. not listed in package.json ), and supposed to be used internally.

import { ci } from 'node_modules/@fullcalendar/core/internal-common'

The behavior here is correct because it can ONLY be imported this way.

@laterdayi
Copy link
Author

I didn't have this feature before, but in many cases I don't need to import node_modules. Is there a way to disable it

@RayGuo-ergou
Copy link
Contributor

I don't use vscode but you can check this comment: microsoft/TypeScript#35395 (comment)

@laterdayi
Copy link
Author

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request new features
Projects
None yet
Development

No branches or pull requests

2 participants