Overview of YAML Language Server features
mainThe YAML Language Server provides YAML language features over the Language Server Protocol (LSP). Key features include:
- YAML validation: Detects valid YAML syntax and reports diagnostics like invalid keys, invalid types, or missing nodes.
- Document symbols: Provides a hierarchical view of YAML nodes.
- Completion: Suggests keys, values, and structures based on associated JSON schemas, including schema defaults.
- Hover: Displays schema descriptions, anchor information (if
yaml.hoverAnchoris enabled), and schema source information (ifyaml.hoverSchemaSourceis enabled). - Formatting: Formats YAML documents and supports on-type formatting (e.g., automatic indentation on newline).
Note: Completion and hover content are driven by schemas. The server uses eemeli/yaml for parsing, defaulting to YAML spec version 1.2.