{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/nixd-configuration/latest.json",
  "title": "JSON schema for nixd",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/nix-community/nixd/main/nixd/docs/nixd-schema.json",
    "sourceSha256": "91ae1e2414ee579911b1d36142bd3f10ea63b3e775385472a69a77a0163de57d",
    "fileMatch": [
      ".nixd.json"
    ],
    "parsers": [
      "json"
    ]
  },
  "type": "object",
  "properties": {
    "eval": {
      "description": "The evaluation section, provide auto completion for dynamic bindings.",
      "type": "object",
      "properties": {
        "target": {
          "$ref": "#/$defs/target"
        },
        "depth": {
          "description": "Extra depth for evaluation",
          "type": "integer",
          "default": 0
        },
        "workers": {
          "description": "The number of workers for evaluation task. defaults to std::thread::hardware_concurrency",
          "type": "integer"
        }
      }
    },
    "formatting": {
      "command": {
        "description": "Which command you would like to do formatting",
        "default": "nixfmt",
        "type": "string"
      }
    },
    "options": {
      "description": "Tell the language server your desired option set, for completion. This is lazily evaluated.",
      "type": "object",
      "properties": {
        "enable": {
          "description": "Enable option completion task. If you are writing a package, disable this",
          "type": "boolean",
          "default": "false"
        },
        "target": {
          "$ref": "#/$defs/target"
        }
      }
    }
  },
  "$comment": "https://github.com/nix-community/nixd/blob/main/docs/user-guide.md#configuration",
  "$defs": {
    "target": {
      "description": "Nix installables that will be used for root translation unit.",
      "type": "object",
      "properties": {
        "args": {
          "description": "Accept args as \"nix eval\"",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "installable": {
          "description": "\"nix eval\"",
          "type": "string"
        }
      }
    }
  }
}
