{
  "name": "coc-xml",
  "version": "1.14.2",
  "description": "XML extension for coc.nvim",
  "main": "lib/index.js",
  "author": "Heyward Fann <fannheyward@gmail.com>",
  "license": "MIT",
  "scripts": {
    "build": "node esbuild.mjs",
    "prepare": "node esbuild.mjs"
  },
  "engines": {
    "coc": "^0.0.80"
  },
  "keywords": [
    "coc.nvim",
    "xml"
  ],
  "activationEvents": [
    "onLanguage:xml",
    "onLanguage:xslt"
  ],
  "devDependencies": {
    "@rgrove/parse-xml": "^4.0.1",
    "@types/glob": "^8.0.0",
    "@types/node": "16",
    "@types/node-fetch": "^2.6.2",
    "@types/semver": "^7.3.13",
    "@types/tunnel": "^0.0.7",
    "coc.nvim": "^0.0.83-next.18",
    "esbuild": "^0.27.0",
    "glob": "10.5",
    "node-fetch": "^2.6.0",
    "path-exists": "^4.0.0",
    "semver": "^7.3.8",
    "tunnel": "^0.0.6",
    "typescript": "^6.0.2"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/fannheyward/coc-xml.git"
  },
  "prettier": {
    "printWidth": 160,
    "singleQuote": true
  },
  "contributes": {
    "configuration": {
      "type": "object",
      "title": "XML configuration",
      "properties": {
        "xml.java.home": {
          "type": [
            "string",
            "null"
          ],
          "default": null,
          "description": "Specifies the folder path to the JDK (11 or more recent) used to launch the XML Language Server if the Java server is being run.\nOn Windows, backslashes must be escaped, i.e.\n`\"xml.java.home\": \"C:\\\\Program Files\\\\Java\\\\jdk11\"`.",
          "scope": "window"
        },
        "xml.server.vmargs": {
          "type": [
            "string",
            "null"
          ],
          "default": "-Xmx64M",
          "description": "Specifies extra VM arguments used to launch the XML Language Server. Eg. use `-Xmx1G  -XX:+UseG1GC -XX:+UseStringDeduplication` to increase the heap size to 1GB and enable String deduplication with the G1 Garbage collector.",
          "scope": "window"
        },
        "xml.server.workDir": {
          "type": "string",
          "default": "~/.lemminx",
          "description": "Set a custom folder path for cached XML Schemas. An absolute path is expected, although the `~` prefix (for the user home directory) is supported. Default is `~/.lemminx`.",
          "scope": "window"
        },
        "xml.trace.server": {
          "type": "string",
          "enum": [
            "off",
            "messages",
            "verbose"
          ],
          "default": "off",
          "description": "Traces the communication between VS Code and the XML language server in the Output view. Default is `off`.",
          "scope": "window"
        },
        "xml.logs.client": {
          "type": "boolean",
          "default": true,
          "description": "Enable/disable logging to the Output view. Default is `true`."
        },
        "xml.downloadExternalResources.enabled": {
          "type": "boolean",
          "default": true,
          "description": "Download external resources like referenced DTD, XSD. Default is `true`.",
          "scope": "window"
        },
        "xml.catalogs": {
          "type": "array",
          "default": [],
          "items": {
            "type": "string"
          },
          "description": "Register XML catalog files.",
          "scope": "window"
        },
        "xml.fileAssociations": {
          "type": "array",
          "default": [],
          "items": {
            "type": "object",
            "properties": {
              "pattern": {
                "type": "string",
                "description": "File glob pattern. Example: `**/*.Format.ps1xml`\n\nMore information on the glob syntax: https://docs.oracle.com/javase/tutorial/essential/io/fileOps.html#glob"
              },
              "systemId": {
                "type": "string",
                "description": "The path or URL to the XML schema (XSD or DTD)."
              }
            },
            "required": [
              "pattern",
              "systemId"
            ]
          },
          "description": "Allows XML schemas/ DTD to be associated to file name patterns.\n\nExample:\n```json\n[{\n  \"pattern\": \"file1.xml\",\n  \"systemId\": \"path/to/file.xsd\"\n},\n{\n  \"pattern\": \"**/*.xsd\",\n  \"systemId\": \"http://www.w3.org/2001/XMLSchema.xsd\"\n}]\n```",
          "scope": "window"
        },
        "xml.foldings.includeClosingTagInFold": {
          "type": "boolean",
          "default": false,
          "description": "Minimize the closing tag after folding. Default is `false`.",
          "scope": "window"
        },
        "xml.format.enabled": {
          "type": "boolean",
          "default": true,
          "description": "Enable/disable ability to format document. Default is `true`.",
          "scope": "window"
        },
        "xml.format.emptyElements": {
          "type": "string",
          "enum": [
            "ignore",
            "collapse",
            "expand"
          ],
          "default": "ignore",
          "description": "Expand/collapse empty elements. Default is `ignore`.",
          "scope": "window"
        },
        "xml.format.enforceQuoteStyle": {
          "type": "string",
          "enum": [
            "preferred",
            "ignore"
          ],
          "markdownEnumDescriptions": [
            "Use preferred quote style set by `xml.preferences.quoteStyle` when formatting.",
            "Ignore quote style formatting."
          ],
          "default": "ignore",
          "description": "Enforce `preferred` quote style (set by `#xml.preferences.quoteStyle#`) or `ignore` quote style when formatting. Default is `ignore`.",
          "scope": "window"
        },
        "xml.format.legacy": {
          "type": "boolean",
          "default": false,
          "description": "Enable/disable legacy formatter. Default is `false`.",
          "scope": "window"
        },
        "xml.format.grammarAwareFormatting": {
          "type": "boolean",
          "default": true,
          "description": "Use Schema/DTD grammar information while formatting. Default is `true`. Not supported by legacy formatter.",
          "scope": "window"
        },
        "xml.format.joinCDATALines": {
          "type": "boolean",
          "default": false,
          "description": "Set to `true` to join lines in CDATA content during formatting. Default is `false`.",
          "scope": "window"
        },
        "xml.format.joinCommentLines": {
          "type": "boolean",
          "default": false,
          "description": "Join comment content on format. Default is `false`.",
          "scope": "window"
        },
        "xml.format.joinContentLines": {
          "type": "boolean",
          "default": false,
          "description": "Normalize the whitespace of content inside an element. Newlines and excess whitespace are removed. Default is `false`.",
          "scope": "window"
        },
        "xml.format.maxLineWidth": {
          "type": "integer",
          "default": 100,
          "description": "Max line width. Set to `0` to disable this setting. Default is `100`. Not supported by legacy formatter.",
          "scope": "window"
        },
        "xml.format.preserveAttributeLineBreaks": {
          "type": "boolean",
          "default": true,
          "description": "Preserve line breaks that appear before and after attributes. This setting is overridden if `#xml.format.splitAttributes#` is set to `splitNewLine` or `alignWithFirstAttr`. Default is `true`.",
          "scope": "window"
        },
        "xml.format.preserveEmptyContent": {
          "type": "boolean",
          "default": false,
          "description": "Preserve empty content/whitespace in a tag. Default is `false`. Supported only with legacy formatter.",
          "scope": "window"
        },
        "xml.format.preservedNewlines": {
          "type": "integer",
          "enum": [
            0,
            1,
            2,
            3
          ],
          "default": 2,
          "description": "Preserve new lines that separate tags. The value represents the maximum number of new lines per section. A value of 0 removes all new lines. Default is `2`.",
          "scope": "window"
        },
        "xml.format.preserveSpace": {
          "type": "array",
          "default": [
            "xsl:text",
            "xsl:comment",
            "xsl:processing-instruction",
            "literallayout",
            "programlisting",
            "screen",
            "synopsis",
            "pre",
            "xd:pre",
            "style",
            "script"
          ],
          "items": {
            "type": "string"
          },
          "description": "Element names for which spaces will be preserved. Not supported by legacy formatter.",
          "scope": "window"
        },
        "xml.format.spaceBeforeEmptyCloseTag": {
          "type": "boolean",
          "default": true,
          "description": "Insert space before end of self closing tag. \nExample:\n  ```<tag/> -> <tag />```. Default is `true`.",
          "scope": "window"
        },
        "xml.format.xsiSchemaLocationSplit": {
          "type": "string",
          "enum": [
            "onElement",
            "onPair",
            "none"
          ],
          "markdownEnumDescriptions": [
            "Put a new line after each namespace and URI, arranging them into one column.",
            "Put a new line after each URI, arranging the content into pairs of namespace and URI.",
            "Ignore `xsi:schemaLocation` content formatting."
          ],
          "default": "onPair",
          "description": "Split `xsi:schemaLocation` content. Default is `onPair`.",
          "scope": "window"
        },
        "xml.format.splitAttributes": {
          "type": "string",
          "enum": [
            "preserve",
            "splitNewLine",
            "alignWithFirstAttr"
          ],
          "default": "preserve",
          "description": "Split multiple attributes each onto a new line or align attributes to the first. Default is `preserve`. Indicate level of indentation with `#xml.format.splitAttributesIndentSize#`.",
          "scope": "window"
        },
        "xml.format.splitAttributesIndentSize": {
          "type": "number",
          "default": 2,
          "description": "How many levels to indent the attributes by when `#xml.format.splitAttributes#` is `true`. Default value is `2`. "
        },
        "xml.format.closingBracketNewLine": {
          "type": "boolean",
          "default": false,
          "description": "The option to put a closing bracket on a newline when `#xml.format.splitAttributes#` is `true`. Default value is `false`. "
        },
        "xml.completion.autoCloseTags": {
          "type": "boolean",
          "default": true,
          "description": "Enable/disable autoclosing of XML tags. Default is `true`. \n\nIMPORTANT: Turn off `#editor.autoClosingTags#` for this to work.",
          "scope": "window"
        },
        "xml.completion.autoCloseRemovesContent": {
          "type": "boolean",
          "default": true,
          "description": "Enable/disable the content of an element being removed when the element start tag is turned into a self-closing tag. The default setting is to remove the content.",
          "scope": "window"
        },
        "xml.codeLens.enabled": {
          "type": "boolean",
          "default": false,
          "description": "Enable/disable XML CodeLens. Default is `false`. "
        },
        "xml.preferences.quoteStyle": {
          "type": "string",
          "enum": [
            "single",
            "double"
          ],
          "default": "double",
          "description": "Preferred quote style to use for completion: `single` quotes, `double` quotes. Default is `double`.",
          "scope": "window"
        },
        "xml.preferences.showSchemaDocumentationType": {
          "type": "string",
          "default": "all",
          "enum": [
            "documentation",
            "appinfo",
            "all",
            "none"
          ],
          "markdownEnumDescriptions": [
            "Documentation comes from the `xs:documentation` element.",
            "Documentation comes from the `xs:appinfo` element.",
            "Documentation comes from the `xs:documentation` and `xs:appinfo` elements.",
            "Displays no documentation."
          ],
          "description": "Specifies the source of the XML schema documentation displayed on hover and completion. Default is `all`.",
          "scope": "window"
        },
        "xml.validation.enabled": {
          "type": "boolean",
          "default": true,
          "description": "Enable/disable all validation. Default is `true`.",
          "scope": "window"
        },
        "xml.validation.namespaces.enabled": {
          "type": "string",
          "default": "always",
          "enum": [
            "always",
            "never",
            "onNamespaceEncountered"
          ],
          "markdownEnumDescriptions": [
            "Enable namespaces validation.",
            "Disable namespaces validation.",
            "Enable namespaces validation only when the root element declares an xmlns namespace."
          ],
          "description": "Enable/disable namespaces validation. Default is `always`. Ignored if `#xml.validation.enabled#` is set to `false`.",
          "scope": "window"
        },
        "xml.validation.schema.enabled": {
          "type": "string",
          "default": "always",
          "enum": [
            "always",
            "never",
            "onValidSchema"
          ],
          "markdownEnumDescriptions": [
            "Enable schema based validation.",
            "Disable schema based validation.",
            "Enable schema based validation only when the declared xsi:schemaLocation hint or xsi:noNamespaceSchemaLocation is valid for the root element."
          ],
          "description": "Enable/disable schema based validation. Default is `always`. Ignored if `#xml.validation.enabled#` is set to `false`.",
          "scope": "window"
        },
        "xml.validation.disallowDocTypeDecl": {
          "type": "boolean",
          "default": false,
          "description": "Enable/disable if a fatal error is thrown if the incoming document contains a DOCTYPE declaration. Default is `false`.",
          "scope": "window"
        },
        "xml.validation.resolveExternalEntities": {
          "type": "boolean",
          "default": false,
          "description": "Enable/disable resolve of external entities. Default is `false`.",
          "scope": "window"
        },
        "xml.validation.xInclude.enabled": {
          "type": "boolean",
          "default": false,
          "description": "Enable/disable validation for `xi:include`. Default is `false`.",
          "scope": "window"
        },
        "xml.validation.noGrammar": {
          "type": "string",
          "enum": [
            "ignore",
            "hint",
            "info",
            "warning",
            "error"
          ],
          "default": "hint",
          "description": "The message severity when a document has no associated grammar. Default is `hint`.",
          "scope": "window"
        },
        "xml.symbols.enabled": {
          "type": "boolean",
          "default": true,
          "description": "Enable/disable document symbols (Outline). Default is `true`. No symbols are given if `\"xml.symbols.enabled\": false`.",
          "scope": "window"
        },
        "xml.validation.filters": {
          "type": "array",
          "default": [
            {
              "pattern": "**.exsd",
              "noGrammar": "ignore",
              "schema": {
                "enabled": "never"
              }
            },
            {
              "pattern": "**{.project,.classpath,plugin.xml,feature.xml,category.xml,.target,.product}",
              "noGrammar": "ignore"
            }
          ],
          "items": {
            "type": "object",
            "properties": {
              "pattern": {
                "type": "string",
                "description": "File glob pattern. Example: `**/*.Format.ps1xml`\n\nMore information on the glob syntax: https://docs.oracle.com/javase/tutorial/essential/io/fileOps.html#glob"
              }
            },
            "required": [
              "pattern"
            ]
          }
        },
        "xml.symbols.excluded": {
          "type": "array",
          "default": [],
          "items": {
            "type": "string"
          },
          "description": "Disable document symbols (Outline) for the given file name patterns. Updating file name patterns does not automatically reload the Outline view for the relevant file(s). Each file must either be reopened or changed, in order to trigger an Outline view reload.\n\nExample:\n```\n[\n \"**/*LargeFile.xml\"\n]```.",
          "scope": "window"
        },
        "xml.symbols.maxItemsComputed": {
          "type": "integer",
          "default": 5000,
          "description": "The maximum number of outline symbols and folding regions computed (limited for performance reasons). Default is `5000`. "
        },
        "xml.symbols.showReferencedGrammars": {
          "type": "boolean",
          "default": true,
          "description": "Show referenced grammars in the Outline. Default is `true`.",
          "scope": "window"
        },
        "xml.symbols.filters": {
          "type": "array",
          "default": [],
          "items": {
            "type": "object",
            "properties": {
              "pattern": {
                "type": "string",
                "description": "File glob pattern. Example: `**/*.Format.ps1xml`\n\nMore information on the glob syntax: https://docs.oracle.com/javase/tutorial/essential/io/fileOps.html#glob"
              },
              "expressions": {
                "type": "array",
                "default": [],
                "items": {
                  "type": "object",
                  "description": "The XML symbol expression.",
                  "properties": {
                    "xpath": {
                      "type": "string",
                      "description": "The XPath expression of the filter."
                    },
                    "excluded": {
                      "type": "boolean",
                      "description": "Exclude/Include the node which matches the XPath expression."
                    },
                    "inlineAttribute": {
                      "type": "boolean",
                      "description": "Whether or not to show an attribute expression inline with the owning element instead of nested."
                    },
                    "showAttributeName": {
                      "type": "boolean",
                      "description": "Whether or not the attribute expression name should be shown along with its value (for inline attributes only)."
                    }
                  }
                },
                "description": "Array of XML symbol expressions"
              }
            },
            "required": [
              "pattern",
              "expressions"
            ]
          },
          "description": "Allows XML symbols filter to be associated to file name patterns.",
          "scope": "window"
        },
        "xml.references": {
          "type": "array",
          "default": [],
          "items": {
            "type": "object",
            "properties": {
              "pattern": {
                "type": "string",
                "description": "matches the files that reference declared with `expressions` applies to.\n\nMore information on the glob syntax: https://docs.oracle.com/javase/tutorial/essential/io/fileOps.html#glob"
              },
              "prefix": {
                "type": "string",
                "description": "The prefix to use (ex : '#')  for from for all the declared reference expressions."
              },
              "multiple": {
                "type": "boolean",
                "description": "true if the from attribute, text can declare several from references and false otherwise for all the declared reference expressions."
              },
              "expressions": {
                "type": "array",
                "default": [],
                "items": {
                  "type": "object",
                  "properties": {
                    "prefix": {
                      "type": "string",
                      "description": "The prefix to use (ex : '#')  for from."
                    },
                    "multiple": {
                      "type": "boolean",
                      "description": "true if the from attribute, text can declare several from references and false otherwise."
                    },
                    "from": {
                      "type": "string",
                      "description": "The from reference DOM node (attribute, text) declared with XPath (ex: foo/@attr, foo/text())."
                    },
                    "to": {
                      "type": "string",
                      "description": "The to reference DOM node (attribute, text) declared with XPath (ex: foo/@attr, foo/text())."
                    }
                  }
                },
                "required": [
                  "from",
                  "to"
                ]
              }
            },
            "required": [
              "pattern",
              "expressions"
            ]
          },
          "description": "Allows references for the given file name patterns.",
          "scope": "window"
        },
        "xml.colors": {
          "type": "array",
          "default": [],
          "items": {
            "type": "object",
            "properties": {
              "pattern": {
                "type": "string",
                "description": "matches the files that colors declared with `expressions` applies to.\n\nMore information on the glob syntax: https://docs.oracle.com/javase/tutorial/essential/io/fileOps.html#glob"
              },
              "expressions": {
                "type": "array",
                "default": [],
                "items": {
                  "type": "object",
                  "properties": {
                    "xpath": {
                      "type": "string",
                      "description": "The color DOM node (attribute, text) declared with XPath (ex: foo/@color, foo/text())"
                    }
                  }
                },
                "required": [
                  "xpath"
                ]
              }
            },
            "required": [
              "pattern",
              "expressions"
            ]
          },
          "description": "Allows colors for the given file name patterns.",
          "scope": "window"
        },
        "xml.filePathSupport.mappings": {
          "type": "array",
          "default": [],
          "items": {
            "type": "object",
            "properties": {
              "pattern": {
                "type": "string",
                "description": "matches the files that file path declared with `expressions` applies to.\n\nMore information on the glob syntax: https://docs.oracle.com/javase/tutorial/essential/io/fileOps.html#glob"
              },
              "expressions": {
                "type": "array",
                "default": [],
                "items": {
                  "type": "object",
                  "properties": {
                    "xpath": {
                      "type": "string",
                      "description": "The file path DOM node (attribute, text) declared with XPath (ex: foo/@path, foo/text())"
                    },
                    "filter": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "String array which contains allowed file extensions (ex: [\".png\", \".gif\", \".jpg\"])"
                    },
                    "separator": {
                      "type": "string",
                      "description": "Separator character to use if multiple file paths are allowed (ex: \";\")"
                    }
                  }
                },
                "required": [
                  "xpath"
                ]
              }
            },
            "required": [
              "pattern",
              "expressions"
            ]
          },
          "description": "Allows file path for the given file name patterns.",
          "scope": "window"
        }
      }
    },
    "commands": [
      {
        "command": "xml.show.references",
        "title": "Show XML references",
        "category": "XML"
      },
      {
        "command": "xml.updateLanguageServer",
        "title": "Download latest version of LemMinX from repo.eclipse.org",
        "category": "XML"
      }
    ]
  }
}
