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

Auto import use modules when snippet is triggered #3

Closed
patriciobcs opened this issue Nov 11, 2022 · 0 comments
Closed

Auto import use modules when snippet is triggered #3

patriciobcs opened this issue Nov 11, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@patriciobcs
Copy link
Owner

Currently, an snippet only add itself to the codebase but its dependencies are not added automatically.

VSCode Snippets doesn't allow the declaration of modules/imports in the snippets.json. However, Rust Analyzer allows the declaration of snippets overwritting the propiety rust-analyzer.completion.snippets.custom.

To resolve this issue, the snippet-lang should include snippet-requires-start/end tags and the compiler should be able to convert them to the Rust Analyzer format. The location of the snippets will be the inside the contributes of the extension's package.json.

@patriciobcs patriciobcs added the enhancement New feature or request label Nov 11, 2022
@patriciobcs patriciobcs self-assigned this Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

1 participant