question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add ability to extend from other settings files

See original GitHub issue

Inspired by TSLint’s ability to extend configuration files, it would be nice if .vscode/settings.json could behave the same way.

So if I have some global settings set up:

~/example-repo/.vscode/my-company-settings.json:

{
  "editor.tabSize": 2,
  "editor.insertSpaces": true,
  "editor.formatOnSave": false
}

I can use them in another file, without having to duplicate the settings:

~/example-repo/my-project/.vscode/settings.json:

{
  "extends": "../../.vscode/my-company-settings.json",
  "editor.formatOnSave": true,
  "editor.fontLigatures": true
}

And the computed settings for ~/example-repo/my-project/.vscode/settings.json would be:

{
  "editor.tabSize": 2,
  "editor.insertSpaces": true,
  "editor.formatOnSave": true,
  "editor.fontLigatures": true
}

Scenario:

Multi-root workspace doesn’t solve this for our use case. We have a bunch of npm modules each in their own git repository. We have a package which contains our shared tsconfig.json and tslint.json settings that all the other packages include with extends. We don’t use a multi-root workspace since the idea is that people can clone the specific package(s) they need to work on. Every repository contains the exact same .vscode directory which is essentially copy&pasted all over the place. Maintaining the .vscode settings for the projects is “not pretty” compared to the tsconfig.json and tslint.json which only require the settings package to be updated with for example yarn upgrade.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:567
  • Comments:59 (15 by maintainers)

github_iconTop GitHub Comments

69reactions
mmkalcommented, Sep 28, 2017

@bpasero @jrieken any update on this? Would the team be open to PRs?

IMO the lack of this feature is the reason that questions like should I commit the .vscode folder to source control? are controversial/asked at all. This isn’t just useful for monorepos - it could allow having settings specific to a project and user.

Say you have team settings checked in to .vscode/settings.json, but you want to set something to some specific value, only for a single project. Currently you’d have to make that change in the team .vscode/settings.json file, which sucks because you’d the either have to check it in to source control for the whole team, or add the file to .git/info/exclude (in which case every time you do need to update the file in source control, you have to undo the exclusion, remove your personal settings, apply the team changes, check-in, re-apply your personal settings and redo the exclusion).

If settings/tasks/launch.json supported extends, you could have a .vscode/settings.team.json with the team settings, then .vscode/settings.json could be:

{
    "extends": ["./settings.team.json", "./settings.user.json"]
}

where .vscode/settings.user.json is in .gitignore. launch.json and tasks.json could work in exactly the same way (I guess this feature would probably need to be implemented so it can handle the ./settings.user.json not existing).

65reactions
sandy081commented, Oct 9, 2020

Unfortunately no plans at present to implement this. Sorry for saying so.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to extend the settings file in Django? - Stack Overflow
I'm using Constance - Dynamic Django settings to configure some values in my project. according to Constance, I should add all the ...
Read more >
Manage external sharing for your organization - Google Support
Turn on or off external sharing of files and folders in Drive · Sign in to your Google Admin console. · In the...
Read more >
User and Workspace Settings - Visual Studio Code
Extension settings​​ Installed VS Code extensions can also contribute their own settings, which you can review under the Extensions section of the Settings...
Read more >
Enable and configure versioning for a list or library
Create a version each time you edit a file in this document library using either major versions only, or major and minor versions....
Read more >
Manage hosted feature layers—ArcGIS Online Help
Enable attachments—Add attachments to features in hosted feature layers. ... This setting does not affect others' ability to export data from the underlying ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found