Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

azure-pipelines-language-service

microsoft372MIT0.8.0TypeScript support: included

Azure Pipelines language service

azure-pipelines, LSP

readme

Features

  1. YAML validation:
    • Detects whether the entire file is valid yaml
  2. Validation:
    • Detects errors such as:
      • Node is not found
      • Node has an invalid key node type
      • Node has an invalid type
      • Node is not a valid child node
    • Detects warnings such as:
      • Node is an additional property of parent
  3. Auto completion:
    • Auto completes on all commands
    • Scalar nodes autocomplete to schema's defaults if they exist
  4. Hover support:
    • Hovering over a node shows description if available
  5. Document outlining:
    • Shows a complete document outline of all nodes in the document

Language Server Settings

The following settings are supported:

  • yaml.format.enable: Enable/disable default YAML formatter
  • yaml.validate: Enable/disable validation feature
  • yaml.schemas: Helps you associate schemas with files in a glob pattern
  • yaml.customTags: Array of custom tags that the parser will validate against. It has two ways to be used. Either an item in the array is a custom tag such as "!Ref" or you can specify the type of the object !Ref should be by doing "!Ref scalar". For example: ["!Ref", "!Some-Tag scalar"]. The type of object can be one of scalar, sequence, mapping, map.
Associating a schema to a glob pattern via yaml.schemas:

When associating a schema it should follow the format below

yaml.schemas: {
    "url": "globPattern",
    "Kubernetes": "globPattern",
    "kedge": "globPattern"
}

e.g.

yaml.schemas: {
    "http://json.schemastore.org/composer": "/*"
}

e.g.

yaml.schemas: {
    "kubernetes": "/myYamlFile.yaml"
}

e.g.

yaml.schemas: {
    "kedge": "/myKedgeApp.yaml"
}

e.g.

yaml.schemas: {
    "http://json.schemastore.org/composer": "/*",
    "kubernetes": "/myYamlFile.yaml"
}

yaml.schemas extension allows you to specify json schemas that you want to validate against the yaml that you write. Kubernetes and kedge are optional fields. They do not require a url as the language server will provide that. You just need the keywords kubernetes/kedge and a glob pattern.

Dependents/Clients

This repository only contains the server implementation. Here are some known clients consuming this server:

Thanks

This project was forked from the YAML Language Server by Red Hat.

changelog

0.8.0

  • Added "go to definition" support for templates #PR-157 - thanks @Stuart-Wilcox!
  • Added a standalone azure-pipelines-language-server executable #PR-147 - thanks @williamboman!
  • Updated dependencies

0.7.0

  • Added support for using expressions as values #PR-138
  • Fixed badly-indented files crashing the language server #PR-141

0.6.9

  • Fixed loops crashing the language server when the first key/value pair had a dynamic expression as the key #PR-130

0.6.8

  • Updated dependencies

0.6.7

  • Support emojis #PR-115 - thanks @PaulTaykalo!

0.6.6

  • Fixed property autocomplete adding unnecessary colons #PR-113
  • More conditional expression fixes #PR-114

0.6.5

  • Conditional variable fixes - thanks @50Wliu

0.6.4

  • Handle dynamic variables - thanks @50Wliu

0.6.3

  • Add basic support for expressions

0.6.2

  • Dependency updates

0.6.1

  • Webpack

0.6.0

  • Improved debuggability - thanks @50Wliu
  • Several security fixes as recommended by dependabot

0.5.10

Update dependencies for a security issue#PR-72

0.5.9

Update dependencies for a security issue#PR-68

0.5.8

Extending language service to make task codelens possible #PR-66 Yaml traversal: export interfaces and return both the start and end positions #PR-67

0.5.7

Allow boolean values to validate against string schema #PR-62 Remove consideration of firstProperty schema element when generating errors #PR-63 Improve positioning of unexpected property errors #PR-64

0.5.6

Cache schemas when using a custom schema provider to improve performance #PR-60 update dependencies for security fixes #PR-61

0.5.5

Better handling of YAML structure errors #PR-58 Cache schemas to improve performance #PR-59

0.5.4

Change schema service to use a schema object instead of a JSON string #PR-53

0.5.3

Improve performance #PR-51 Improve error messages and suggestions #PR-52

0.5.2

Fix a regression with YAML structure errors #PR-49 Improve performance #PR-50

0.5.1

version 0.5.0 was not built correctly

0.5.0

Add support for property aliases #PR-33 Improve auto-complete suggestions #PR-44 Reject multi-document files #PR-46

0.4.1

Fix bug where enums that looked like numbers would be marked invalid #PR-29 do not suggest case insensitive properties when a matching property is present #PR-28 Allow empty strings to be validated #PR-30 Fix issue with trailing space when auto-completing #PR-32

0.4.0

introduce the "ignoreCase" schema option that can be used to turn off case sensitivity for property keys and/or values #PR-22 #PR-23 use "firstProperty" to improve validation errors and auto-complete suggestions #PR-26 Always add colon to the completion text for properties #PR-25

0.3.0

introduce the "firstProperty" schema option that indicates which property must be listed first in the object #PR-19

0.2.3

Fix data returned by findDocumentSymbols #PR-14 Update to coveralls@3.0.2 to get rid of cryptiles vulenerability Fix the completion suggestions on file with LF line endings #13

0.2.2

Fix the completion suggestions on empty line bug #PR-12

0.2.1

Fixes to use consistent types in language-service, added webpack to generate UMD bundle #PR-9

0.2.0

azure-pipelines-language-service was split from azure-pipelines-language-server to promote reusability #PR-4