-
Notifications
You must be signed in to change notification settings - Fork 144
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
Add "enablePatterns" config option #92
Conversation
Workspace directory, I'll add a note in the docs.
Regex, and same.
Agreed, that's a better name, I'll update. |
4ba6e8d
to
6e5e363
Compare
@Flaque This looks amazing! I am trying to use Deno just for testing along with Snowpack for building. I need the Who has the authority to merge this, it has been nearly a month. Do you think it is ready now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, sorry it took so long @Flaque, thanks for this contribution.
🎉🎉🎉🎉 |
A new config option, `deno.enablePatterns`, was added in denoland#92. The [config schema](https://code.visualstudio.com/api/references/contribution-points#contributes.configuration) wasn't added, probably because there's no UI editor for "array" type. However, it's still worth defining. 1. To avoid this misleading feedback: 2. To get an indication in the Settings UI that the key exists and can be edited in the JSON: > Other types, such as object and array, aren't exposed directly in the settings UI, and can only be modified by editing the JSON directly. Instead of controls for editing them, users will see a link to Edit in settings.json as shown in the screenshot above.
Overview
This PR adds a
deno.enablePatterns
config option that lets you specify particular paths or folders where the extension is enabled. This is useful for projects that contain both Node code and Deno code, such as thevscode_deno
repo itself. This relates to #87Example usage:
Each item in the array matches a regex and only one item needs to match to enable the extension on that file.
Disclaimer
This is more of a suggestion. Totally understand if this is the wrong naming convention, or the wrong way to go about this.
Testing Done
I've played around with this in a number of different configurations in this example repo I setup. Though it might be a good idea for someone else to play around with it.