Skip to content

XML#

Server#

For more information about the LSP server, check lsp4xml.

Installation#

This Server supports automatic install. Install this language server with M-xlsp-install-serverRETxmllsRET.

Automatic by lsp-mode

Debugger: Not available#

Available configurations#

lsp-xml-catalogs#

Type: (repeat string)

Default: nil

Array of XML Catalogs


lsp-xml-completion-auto-close-tags#

Type: boolean

Default: t

Enable/disable autoclosing of XML tags. IMPORTANT: Turn off editor.autoClosingTags for this to work


lsp-xml-file-associations#

Type: (repeat string)

Default: nil

Allows XML schemas to be associated to file name patterns. Example: [{ "systemId":"path/to/file.xsd","pattern": "file1.xml" },{ "systemId": "http://www.w3.org/2001/XMLSchema.xsd","pattern": "*/.xsd" }]


lsp-xml-format-closing-bracket-new-line#

Type: boolean

Default: nil

Enable/disable moving the closing bracket.

This only affects tags with two or more (split) attributes.


lsp-xml-format-comments#

Type: boolean

Default: t

Enable/disable comment formatting.


lsp-xml-format-enabled#

Type: boolean

Default: t

Enable/disable ability to format document


lsp-xml-format-enforce-quote-style#

Type: (choice (const ignore) (const preferred))

Default: ignore

The way in which quote style should be enforced.


lsp-xml-format-experimental#

Type: boolean

Default: nil

Enable/disable experimental formatter.


lsp-xml-format-grammar-aware-formatting#

Type: boolean

Default: t

Enable/disable grammar aware formatting.

This only affects the experimental formatter.


lsp-xml-format-join-cdata-lines#

Type: boolean

Default: nil

Join lines in a CDATA tag`s content


lsp-xml-format-join-comment-lines#

Type: boolean

Default: nil

Join comment content on format


lsp-xml-format-join-content-lines#

Type: boolean

Default: nil

Normalize the whitespace of content inside an element. Newlines and excess whitespace are removed.


lsp-xml-format-max-line-width#

Type: integer

Default: 80

Max line width.

This only applies to experimental formatter.


lsp-xml-format-preserve-attribute-line-breaks#

Type: boolean

Default: t

Enable/disable preserving line breaks in attributes.


lsp-xml-format-preserve-empty-content#

Type: boolean

Default: nil

Preserve empty content/whitespace in a tag.


lsp-xml-format-preserve-space#

Type: lsp-string-vector

Default: [xsl:text xsl:comment xsl:processing-instruction literallayout programlisting screen synopsis pre xd:pre]

List of elements which must preserve space.

This option only affects the experimental formatter.


lsp-xml-format-preserved-newlines#

Type: integer

Default: 2

The number of empty newlines to be preserved.


lsp-xml-format-space-before-empty-close-tag#

Type: boolean

Default: t

Insert space before end of self closing tag. Example: ->


lsp-xml-format-split-attributes#

Type: boolean

Default: nil

Split multiple attributes each onto a new line


lsp-xml-format-split-attributes-indent-size#

Type: integer

Default: 2

The indentation used for split attributes.


lsp-xml-format-xsi-schema-location-split#

Type: (choice (const onElement) (const onPair) (const none))

Default: onPair

XSI schema location split settings.


lsp-xml-jar-download-url#

Type: string

Default: https://repo.eclipse.org/content/repositories/lemminx-releases/org/eclipse/lemminx/org.eclipse.lemminx/0.21.0/org.eclipse.lemminx-0.21.0-uber.jar

Automatic download url for lsp-xml.


lsp-xml-jar-file#

Type: file

Default: ~/.emacs.d/.cache/lsp/xmlls/org.eclipse.lemminx-0.21.0-uber.jar

Xml server jar command.


lsp-xml-logs-client#

Type: boolean

Default: t

Should the server log to client output


lsp-xml-preferences-quote-style#

Type: (choice (const double) (const single))

Default: double

The preferred quote style for attribute values.


lsp-xml-server-command#

Type: (repeat string)

Default: (java -jar /home/runner/.emacs.d/.cache/lsp/xmlls/org.eclipse.lemminx-0.21.0-uber.jar)

Xml server command.


lsp-xml-server-vmargs#

Type: lsp-string-vector

Default: [-noverify -Xmx64M -XX:+UseG1GC -XX:+UseStringDeduplication]

Specifies extra VM arguments used to launch the XML Language Server. Eg. use -noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication to bypass class verification, increase the heap size to 1GB and enable String deduplication with the G1 Garbage collector


lsp-xml-server-work-dir#

Type: string

Default: /home/runner/.lsp4xml

Set a custom folder path for cached XML Schemas. An absolute path is expected, although the ~ prefix (for the user home directory) is supported.


lsp-xml-trace-server#

Type: (choice (const off) (const messages) (const verbose))

Default: off

Traces the communication between VS Code and the XML language server.


lsp-xml-validation-enabled#

Type: boolean

Default: t

Enable/disable all validation.


lsp-xml-validation-no-grammar#

Type: (choice (:tag ignore hint info warning error))

Default: hint

The message severity when a document has no associated grammar.


lsp-xml-validation-resolve-external-entities#

Type: boolean

Default: nil

Enable/disable resolution (downloading) of external entities from the internet.


lsp-xml-validation-schema#

Type: alist

Default: ((enabled . always))

The XML schema settings.

The value for enabled can be always, never or onValidSchema.



Last update: February 3, 2023