Skip to content

Configuration

Manuel Gil @imgildev edited this page Feb 7, 2025 · 1 revision

JSON Flow provides a variety of settings to customize its functionality and tailor it to your workflow. These settings can be adjusted in the VS Code Settings or by directly editing the settings.json file.


Settings Overview

1. Enable JSON Flow

  • Key: jsonFlow.enable
  • Type: string
  • Default: "Enable JSON Flow"
  • Description: Toggles the activation of JSON Flow functionality.

2. Included File Patterns

  • Key: jsonFlow.files.includedFilePatterns
  • Type: array
  • Default:
    [
      "json", "jsonc", "json5", "cfg", "csv", "env", "hcl", 
      "ini", "properties", "toml", "tsv", "xml", "yaml", "yml"
    ]
    • Scope: resource
  • Description: Specifies file extensions to be included in JSON Flow operations.

3. Excluded File Patterns

  • Key: jsonFlow.files.excludedFilePatterns
  • Type: array
  • Default:
    [
      "**/node_modules/**", "**/dist/**", "**/out/**", 
      "**/build/**", "**/vendor/**"
    ]
    • Scope: resource
  • Description: Defines glob patterns for files or folders to exclude from JSON Flow. The default includes common build and vendor directories.

4. Include File Path in Output

  • Key: jsonFlow.files.includeFilePath
  • Type: boolean
  • Default: true
  • Scope: resource
  • Description: Includes the file path in the list of generated files, making it easier to identify file locations.

5. Graph Layout Orientation

  • Key: jsonFlow.graph.layoutOrientation
  • Type: string
  • Default: "TB"
  • Enum Values:
    • "TB": Top-to-Bottom
      • "LR": Left-to-Right
      • "BT": Bottom-to-Top
      • "RL": Right-to-Left
    • Scope: resource
  • Description: Sets the direction of graph layouts for visualizing JSON structures.

How to Configure

1. Through VS Code Settings UI:

  1. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on macOS).
  2. Search for Preferences: Open Settings (UI) and click on it.
  3. Type JSON Flow to filter available settings.
  4. Adjust the values as needed.

2. Editing settings.json:

You can also manually configure JSON Flow by modifying the settings.json file:

{
  "jsonFlow.enable": "Enable JSON Flow",
  "jsonFlow.files.includedFilePatterns": ["json", "yaml", "csv"],
  "jsonFlow.files.excludedFilePatterns": ["**/dist/**", "**/node_modules/**"],
  "jsonFlow.files.includeFilePath": true,
  "jsonFlow.graph.layoutOrientation": "LR"
}

Tips for Configuration

  • Use includedFilePatterns and excludedFilePatterns to fine-tune which files JSON Flow processes.
  • Change the graph layout orientation to fit your preferred visual structure.
  • Ensure includeFilePath is enabled for better traceability of file locations.