Closed Bug 1341585 Opened 3 years ago Closed 3 years ago
.json to ignore files and provide a list of recommended extensions for VS Code
59 bytes, text/x-review-board-request
I'm starting investigating the usage of VS Code for my coding, apart from a few issues (Quick Open is horribly slow), it seems to be a very good replacement for Sublime Text, and it's much faster than Atom. I have found a lot of options are common for most of our codebase, so I'm wondering if we could support vscode workspace settings. It may help newcomers to have a properly setup editor. Otherwise, I'd like us to ignore .vscode so I can have my own workspace definitions there (But considering bug 1323308, that sounds unlikely) I'll attach a patch with my current workspace, for evaluation.
Ted, do you know what are our plans here? (looks like :gps is away)
I don't think this should go as-is. People will tweak VS Code to their own favourite options. Those "defaults" certainly aren't what I'm using. So it will always shows up as having a modified .vscode content which is bad. It should simply be added to .gitignore and not provide a default. Or at least make a default that makes sense for everyone.
Summary: Either add a default .vscode, or add it to .hgignore → Either add a default .vscode/settings.json, or add it to .hgignore
I don't think we have particularly strong guidelines on editor settings in-tree. We've historically had emacs+vi modelines in many source files, and we do have a configuration file for YouCompleteMe for vim in the repository. Is it possible to provide a set of defaults for VS Code and then allow people to override them without them modifying the checked-in file? If so, I would support that. If not, it seems like having a checked-in config file would result in more hassle for people.
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #6) > Is it possible to provide a set of defaults for VS Code and then allow > people to override them without them modifying the checked-in file? If so, I > would support that. If not, it seems like having a checked-in config file > would result in more hassle for people. not right now. as I said workspace settings unfortunately override user settings. That said, even if we'd ignore settings.json (so everyone can just put his) and maybe propose some settings on mdn, di we want to consider a recommended extensions list?
If we can provide some helpful configuration for VS Code users in any form I think that's useful. It looks like rillian started some work in that direction in bug 1323308.
Ok, I think for now we could ignore settings.json (in .gitignore and .hgignore) and maybe add a list of suggested extensions. To build that list we could send a message to dev-platform and collect extensions people found useful. From what I can tell, the list of settings that "everyone" would agree upon would be so short, that in practice it would just disallow people from putting their own settings.json in their tree .vscode/. That's a no-go.
I have updated the patch to ignore settings.json and added comments to the recommended extensions list. I'll start a thread in dev-platform to collect ideas about extensions we are using and feedback about the current list.
Assignee: nobody → mak77
Summary: Either add a default .vscode/settings.json, or add it to .hgignore → Add .vscode/settings.json to ignore files and provide a list of recommended extensions for VS Code
Thread created in dev-platform and firefox-dev.
Comment on attachment 8839870 [details] Bug 1341585 - Ignore Visual Studio Code workspace settings and add a recommended extensions file. https://reviewboard.mozilla.org/r/114478/#review116454 ::: .gitignore:127 (Diff revision 3) > > # tup database > /.tup > + > +# Ignore Visual Studio Code workspace settings file. > +.vscode/settings.json there are plenty of files in .vscode that needs ignoring, not just the settings. This includes: Launch configuration C++ configuration Tasks configuration. Additionally, that's where the index files are residing. Really, you want to ignore all of them because they will be modified by the user.
(In reply to Jean-Yves Avenard [:jya] from comment #14) > Really, you want to ignore all of them because they will be modified by the > user. See bug 1323308, that is already planning to add a default tasks.json and c_cpp_properties.json I can see users may want to add further stuff, but then it can be added when it's the time. The only way to ignore the whole .vscode would be for us to completely give up on adding any default setting, and that's not something I want to decide. Also, we can always do that in the future, I'm not disallowing anything with my change.
Ehr, are the index files automatically created in the workspace .vscode by the editor? Since then we really need a way to ignore everything BUT the files bug 1323308 will add.
(In reply to Marco Bonardo [::mak] from comment #16) > Ehr, are the index files automatically created in the workspace .vscode by > the editor? Since then we really need a way to ignore everything BUT the > files bug 1323308 will add. indeed: jyapro:.vscode jyavenard$ ls -la total 1023408 drwxr-xr-x@ 2 jyavenard staff 306 16 Feb 22:03 . drwxr-xr-x@ 58 jyavenard staff 3706 16 Feb 22:48 .. -rw-r--r--@ 2 jyavenard staff 518852608 16 Feb 22:03 .browse.VC.db -rw-r--r--@ 2 jyavenard staff 32768 16 Feb 22:03 .browse.VC.db-shm -rw-r--r--@ 2 jyavenard staff 5079992 16 Feb 22:03 .browse.VC.db-wal -rw-r--r--@ 2 jyavenard staff 1258 16 Feb 22:03 c_cpp_properties.json -rw-r--r--@ 3 jyavenard staff 2253 16 Feb 22:03 launch.json -rw-r--r--@ 4 jyavenard staff 528 16 Feb 22:03 settings.json -rw-r--r--@ 5 jyavenard staff 1022 16 Feb 22:03 tasks.json jyapro:.vscode jyavenard$
Comment on attachment 8839870 [details] Bug 1341585 - Ignore Visual Studio Code workspace settings and add a recommended extensions file. https://reviewboard.mozilla.org/r/114478/#review118246 LGTM
Attachment #8839870 - Flags: review?(jyavenard) → review+
ted, any news on this review? Is there anything blocking us?
Comment on attachment 8839870 [details] Bug 1341585 - Ignore Visual Studio Code workspace settings and add a recommended extensions file. https://reviewboard.mozilla.org/r/114478/#review128154 This seems like a good first implementation. It can always be itereated on.
Attachment #8839870 - Flags: review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/eaba1e1ad2ab Ignore Visual Studio Code workspace settings and add a recommended extensions file. r=gps,jya
You need to log in before you can comment on or make changes to this bug.