volar-service-yaml is a dedicated Volar plugin designed to integrate the robust `yaml-language-server` into Volar-powered development environments. This integration provides comprehensive language features for YAML files, including syntax highlighting, intelligent auto-completion, real-time schema validation, and diagnostic reporting, directly within projects utilizing Volar's language service, commonly found in Vue.js applications. Currently at version 0.0.70, this package primarily acts as a bridge, enabling sophisticated YAML tooling to function seamlessly within Volar's architecture. Its release cadence is generally synchronized with updates to the main Volar language service (specifically targeting `~2.4.0`), ensuring ongoing compatibility and leveraging an established, widely used YAML language server to offer superior developer experience for YAML configuration files within the Volar ecosystem.
npm install volar-service-yamlVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to integrate the YAML language service into your Volar configuration file to enable YAML features.
Ensure your project and VSCode extension ('Vue - Official') are running Volar v2.x or newer. Migrate your Volar configuration if coming from v1.x.Stick to `require('volar-service-yaml').create()` in `volar.config.js`. If you use `volar.config.ts` with `ts-node` or similar, ESM imports (`import { create } from 'volar-service-yaml';`) might be necessary, but verify your specific setup.Review the documentation for `yaml-language-server` on how to configure schemas (e.g., via `.vscode/settings.json` or directly in YAML files) relevant to your project's YAML files.
Run `npm install volar-service-yaml` or `yarn add volar-service-yaml`. Double-check the import/require path. If using a custom Volar config, ensure Node.js can resolve the module in that context.
Ensure you are using the correct import syntax for your module environment. For `volar.config.js`, use `require('volar-service-yaml').create()`. For ESM TypeScript, use `import { create } from 'volar-service-yaml';`.Check your editor's output channels for detailed errors from the Volar language server or the YAML language server. Verify your YAML files for syntax errors or invalid schema references. Ensure no conflicting YAML extensions are active.