Skip to content

HTML#

Server#

For more information about the LSP server, check html.

Installation#

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

npm install -g vscode-langservers-extracted

Debugger: Not available#

Available configurations#

lsp-html-auto-closing-tags#

Type: boolean

Default: t

Enable/disable autoclosing of HTML tags.


lsp-html-experimental-custom-data#

Type: (choice (const nil) string)

Default: nil

A list of JSON file paths that define custom tags, properties and other HTML syntax constructs. Only workspace folder setting will be read.


lsp-html-format-content-unformatted#

Type: (choice (const nil) string)

Default: pre,code,textarea


lsp-html-format-enable#

Type: boolean

Default: t

Enable/disable default HTML formatter.


lsp-html-format-end-with-newline#

Type: boolean

Default: nil

End with a newline.


lsp-html-format-extra-liners#

Type: (choice (const nil) string)

Default: head, body, /html


lsp-html-format-indent-handlebars#

Type: boolean

Default: nil


lsp-html-format-indent-inner-html#

Type: boolean

Default: nil


lsp-html-format-max-preserve-new-lines#

Type: (choice (const nil) integer)

Default: nil


lsp-html-format-preserve-new-lines#

Type: boolean

Default: t

Controls whether existing line breaks before elements should be preserved. Only works before elements, not inside tags or for text.


lsp-html-format-unformatted#

Type: (choice (const nil) string)

Default: wbr


lsp-html-format-wrap-attributes#

Type: (choice (const auto) (const force) (const force-aligned) (const force-expand-multiline) (const aligned-multiple) (const preserve) (const preserve-aligned))

Default: auto

Wrap attributes.


lsp-html-format-wrap-line-length#

Type: number

Default: 120

Maximum amount of characters per line (0 = disable).


lsp-html-server-command-args#

Type: (repeat string)

Default: (--stdio)

Command to start html-languageserver.


lsp-html-suggest-html5#

Type: boolean

Default: t

Controls whether the built-in HTML language support suggests HTML5 tags, properties and values.


lsp-html-trace-server#

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

Default: off

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


lsp-html-validate-scripts#

Type: boolean

Default: t

Controls whether the built-in HTML language support validates embedded scripts.


lsp-html-validate-styles#

Type: boolean

Default: t

Controls whether the built-in HTML language support validates embedded styles.



Last update: September 28, 2023