Skip to content

How to turn off or configure snippet import #4588

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Comments

@laterdayi
Copy link

laterdayi commented Jul 15, 2024

What problem does this feature solve?

image

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

laterdayi commented Jul 16, 2024

image

Neither approach worked

@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

@KazariEX KazariEX removed the feature request Request new features label Jan 18, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants