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.

Issue: Workspace settings.json duplicates user settings.json

See original GitHub issue

Describe the bug

I created a custom content types via user settings.json (user settings).

On every launch of vscode, the plugin creates .vscode/settings.json (workspace settings) merging custom content type + custom description fields and lastmod field.

This causes duplicated fields on every relaunches. (on every launch of vscode, same fields are added to the workspace settings)

Note the lowercased updated and summary are the custom Modified Field and Description field set in user settings.

screen 7

To Reproduce Steps to reproduce the behavior:

Step 1: In user settings.json

  "frontMatter.taxonomy.seoDescriptionLength": 180,
  "frontMatter.taxonomy.modifiedField": "updated",
  "frontMatter.taxonomy.seoDescriptionField": "summary",
  "frontMatter.taxonomy.contentTypes": [
    {
      "name": "default",
      "fields": [
        {
          "title": "Published",
          "name": "date",
          "type": "datetime"
        },
        {
          "title": "Updated",
          "name": "updated",
          "type": "datetime"
        }
      ]
    }
  ],

Step 2: Close and relaunch vscode

Step 3: .vscode/settings.json (workspace settings)

{
  "frontMatter.taxonomy.contentTypes": [
    {
      "name": "default",
      "fields": [
        {
          "title": "Published",
          "name": "date",
          "type": "datetime"
        },
        {
          "title": "Updated",
          "name": "updated",
          "type": "datetime"
        },
        {
          "name": "updated",
          "type": "datetime"
        },
        {
          "name": "summary",
          "type": "string"
        },
        {
          "name": "updated",
          "type": "datetime"
        },
        {
          "name": "summary",
          "type": "string"
        }
      ]
    }
  ]
}

This file will keep adding same fields on every vscode relaunch.

Expected behavior

Make workspace settings as optional / unify to one settings file?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
estruyfcommented, Oct 6, 2021

@flikteoh thank you for becoming a sponsor! 🙏 I just added you to the readme + website as one of the sponsors.

1reaction
estruyfcommented, Oct 6, 2021

Thanks for your feedback! Appreciated to think with me on this one. I’ll close it once the new version got released.

Read more comments on GitHub >

github_iconTop Results From Across the Web

User and Workspace Settings - Visual Studio Code
json file. You can open the settings. json file with the Preferences: Open Settings (JSON) command in the Command Palette (Ctrl+Shift+P).
Read more >
How can I open Visual Studio Code's 'settings.json' file?
Open the command palette (either with F1 or Ctrl + Shift + P ); Type "open settings"; You are presented with a few...
Read more >
How to Setup SonarQube in VS Code | Chiamaka Ikeanyi
In this article, you'll learn how to set up SonarQube in Visual Studio ... Type Open Settings and choose Preferences: Open Settings (JSON)....
Read more >
User and Workspace Settings - vscode-docs
The workspace settings file is located under the .vscode folder in your project. Settings File Sections. The settings.json file is divided into these...
Read more >
Troubleshooting - Dendron
Troubleshooting issues are grouped by feature area. ... Run Dendron inside a Workspace ... go to > workspace: open user settings (JSON) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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