{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "https://json.schemastore.org/stylua.json",
  "title": "Stylua Config",
  "description": "Configuration files for the Stylua formatter",
  "type": "object",
  "properties": {
    "syntax": {
      "description": "Specify a disambiguation for the style of Lua syntax being formatted.",
      "type": "string",
      "default": "All",
      "enum": [
        "All",
        "Lua51",
        "Lua52",
        "Lua53",
        "Lua54",
        "LuaJIT",
        "Luau",
        "CfxLua"
      ]
    },
    "column_width": {
      "description": "Approximate line length for printing.\nUsed as a guide for line wrapping - this is not a hard requirement: lines may fall under or over the limit.",
      "type": "integer",
      "default": 120
    },
    "line_endings": {
      "description": "Line endings type.",
      "type": "string",
      "default": "Unix",
      "enum": ["Unix", "Windows"],
      "x-taplo": {
        "docs": {
          "enumValues": ["LF", "CRLF"]
        }
      }
    },
    "indent_type": {
      "description": "Indent type.",
      "type": "string",
      "default": "Tabs",
      "enum": ["Tabs", "Spaces"]
    },
    "indent_width": {
      "type": "integer",
      "default": 4,
      "description": "Character size of single indentation.\nIf indent_type is set to Tabs, this option is used as a heuristic to determine column width only."
    },
    "quote_style": {
      "description": "Quote style for string literals.",
      "type": "string",
      "default": "AutoPreferDouble",
      "enum": [
        "AutoPreferDouble",
        "AutoPreferSingle",
        "ForceDouble",
        "ForceSingle"
      ],
      "x-taplo": {
        "docs": {
          "enumValues": [
            "Prefer double, but fallback to single if it has fewer escapes.",
            "Prefer single, but fallback to double if it has fewer escapes.",
            "Force double quotes regardless of escapes.",
            "Force single quotes regardless of escapes."
          ]
        }
      }
    },
    "call_parentheses": {
      "description": "Whether parentheses should be applied on function calls with a single string/table argument.",
      "type": "string",
      "default": "Always",
      "enum": ["Always", "NoSingleString", "NoSingleTable", "None", "Input"],
      "x-taplo": {
        "docs": {
          "enumValues": [
            "Applies parentheses in all cases.",
            "Omits parentheses on calls with a single string argument.",
            "Omits parentheses on calls with a single table argument.",
            "Omits parentheses in both cases.\nNote: parentheses are still kept in situations where removal can lead to obscurity (e.g. foo \"bar\".setup -> foo(\"bar\").setup, since the index is on the call result, not the string).",
            "Removes all automation and preserves parentheses only if they were present in input code: consistency is not enforced."
          ]
        }
      }
    },
    "space_after_function_names": {
      "type": "string",
      "description": "Specify whether to add a space between the function name and parentheses.",
      "default": "Never",
      "enum": ["Never", "Definitions", "Calls", "Always"]
    },
    "collapse_simple_statement": {
      "default": "Never",
      "description": "Specify whether to collapse simple statements.",
      "type": "string",
      "enum": ["Never", "FunctionOnly", "ConditionalOnly", "Always"]
    },
    "sort_requires": {
      "type": "object",
      "description": "StyLua has built-in support for sorting require statements. We group consecutive require statements into a single \"block\", and then requires are sorted only within that block. Blocks of requires do not move around the file.\n\nStyLua only considers requires of the form local NAME = require(EXPR), and sorts lexicographically based on NAME. (StyLua can also sort Roblox services of the form local NAME = game:GetService(EXPR))\n\nRequires sorting is off by default.",
      "properties": {
        "enabled": {
          "type": "boolean",
          "default": false
        }
      },
      "x-taplo": {
        "initKeys": ["enabled"]
      }
    }
  }
}
