Skip to content

Issue: Workspace settings.json duplicates user settings.json #133

Closed
@flikteoh

Description

@flikteoh

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions