Skip to content

YAML#

Server#

For more information about the LSP server, check yaml.

Installation#

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

npm install -g yaml-language-server

Debugger: Not available#

Available configurations#

lsp-yaml-bracket-spacing#

Type: boolean

Default: t

Print spaces between brackets in objects.


lsp-yaml-completion#

Type: boolean

Default: t

Enable/disable completion feature.


lsp-yaml-custom-tags#

Type: (lsp-repeatable-vector string)

Default: nil

Custom tags for the parser to use.


lsp-yaml-format-enable#

Type: boolean

Default: t

Enable/disable default YAML formatter.


lsp-yaml-hover#

Type: boolean

Default: t

Enable/disable hover feature.


lsp-yaml-max-items-computed#

Type: number

Default: 5000

The maximum number of outline symbols and folding regions computed. Limited for performance reasons.


lsp-yaml-print-width#

Type: number

Default: 80

Specify the line length that the printer will wrap on.


lsp-yaml-prose-wrap#

Type: (choice (const always) (const never) (const preserve))

Default: preserve

Options for prose-wrap. Always: wrap prose if it exceeds the print width. Never: never wrap the prose. Preserve: wrap prose as-is.


lsp-yaml-schema-extensions#

Type: (list alist)

Default: (((name . Kubernetes v1.30.3) (description . Kubernetes v1.30.3 manifest schema definition) (url . https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.30.3-standalone-strict/all.json) (fileMatch . [*-k8s.yaml *-k8s.yml])))

User defined schemas that extend default schema store. Used in lsp-yaml--get-supported-schemas to supplement schemas provided by lsp-yaml-schema-store-uri.


lsp-yaml-schema-store-enable#

Type: boolean

Default: t

Enable/disable JSON Schema store. When set to true, available YAML schemas will be automatically pulled from the store.


lsp-yaml-schema-store-local-db#

Type: file

Default: ~/.emacs.d/.cache/lsp/lsp-yaml-schemas.json

Cached database of schema store.


lsp-yaml-schema-store-uri#

Type: string

Default: https://www.schemastore.org/api/json/catalog.json

URL of schema store catalog to use.


lsp-yaml-schemas#

Type: (alist :key-type (symbol :tag schema) :value-type (lsp-string-vector :tag files (glob)))

Default: nil

Associate schemas to YAML files in a glob pattern.


lsp-yaml-server-command#

Type: (repeat string)

Default: (yaml-language-server --stdio)

Command to start yaml-languageserver.


lsp-yaml-single-quote#

Type: boolean

Default: nil

Use single quote instead of double quotes.


lsp-yaml-validate#

Type: boolean

Default: t

Enable/disable validation feature.



Last update: November 23, 2024