-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Offer sensible default VSCode settings #9436
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
Conversation
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.
Thanks for sharing, but I'm -0.5 on this. I don't want to get in the business of maintaining editor configurations, nor do I think typeshed has sufficiently unique needs to really justify shipping editor configurations. But maybe other maintainers feel differently!
I don't use VSCode, so I'm pretty neutral here :) In general I agree that I don't really want us into the business of maintaining editor configs (once we add one editor config, it gets hard to justify not adding all the other ones). So I guess I'm -0.5 as well. |
I can understand the reticence
Fair, as I would be for adding the popular python ones (ie PyCharm, w/e most of you use, etc.) if it's useful. The idea being that this can tremendously help new contributors, reduce friction with misconfigured editors, formatters and less reliance on waiting for pre-commit / CI for feedback. As well as help them see errors and they're contributing (red/yellow squigglies). As someone is who is more more experienced with VSCode settings, and already had to go through weeks of figuring out the right configurations, I figured I'd offer them so that other users of the editor don't have to redo all that figuring-out by themselves.
It's also to help with that that I added a YAML formatter to pre-commit (and looking at markdownlint)
That's also why I added So its obviously not the only way to achieve those goals, just another parallel approach. |
FWIW: I used to use PyCharm, until I started contributing to typeshed and CPython. Hacking on CPython in particular just seemed to break PyCharm's brain completely, so I abandoned it and went back to the editor I used before PyCharm, namely..... IDLE (don't laugh). It's as basic as they come, but the advantage of using an editor with 0 features is that none of them get broken when you try to hack on CPython itself 😛 I've tried using VSCode a few times, but it never seems to "click" for me. Don't know why, exactly. |
Maybe we could put these settings somewhere else online, and link to them from typeshed's contributing guide. That way future contributors won't have to wade through the weeks of figuring things out, like you did, but we also don't have the pressure of having to maintain a settings file that we don't necessarily understand the ins and outs of. Thoughts? :) |
I'm actually supportive of merging this (and similar settings for other major editors, if someone contributes them). We can add a disclaimer comment that the maintainer team doesn't commit to maintaining the file or something, but in the meantime this can definitely help contributors. |
Then let's do it. @Avasam, can you add the disclaimer comment somewhere? :) |
Feel free to wordsmith! I feel the disclaimer in the config file itself is fine as it doesn't pollute documentation and only concerns those who know of its existence in the first place |
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.
Thanks @Avasam!
Offer sensible default VSCode settings.
These are the workspace settings, specific to typeshed, that I've been using and filling in over the past few months.
Workspace settings override user settings, so we can offer sensible, all-ready configurations for the typeshed workspace, reducing a lot of the pains a new contributor can have if their favorite editor is VSCode.
These settings obviously won't configure any extension not specified in
.vscode/extensions.json > recommendations
, and will assume the user may not have all recommended extensions installed or set as the formatter. Hence I've also configure some basic VSCode settings.The recommended extensions include:
.editorconfig
support and syntax highlighterFor those not familiar with VSCode: Note that recommendations are not forced onto the user, a popup appears once to mention the workspace has recommended extensions, then they'll only show up under the "recommended" tab in the extensions menu.
It can still make sense for a user to want to modify
.vscode/settings.json
if they want to configure one of their extension to work properly with typeshed, without having to outright disable it for the workspace. It's also up to the dev to decide if they wanna follow these specific editor settings.Unfortunately, VSCode doesn't (yet) offer any way to have "workspace defaults" or "user-worspace settings", so offering defaults to copy is the best we can do at the moment. And is what I've seen done in other open-source projects.