Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Don't use JSON schema when editing YAML file in Visual Studio Code

By default my Visual Studio Code uses a JSON schema definition when editing YAMl files. How to turn this off and simply use YAML syntax highlighting without specific JSON schema? In the schema selector there is not "No schema".

enter image description here

  • Visual Studio code 1.66.0
like image 815
Michael Avatar asked Sep 01 '25 10:09

Michael


2 Answers

You can also define what schema to use with a comment at the top of the yaml file.

If you don't have a schema, you can use the yamllint schema, which doesn't expect any special content, but just warns you about possible general problems:

# yaml-language-server: $schema=https://json.schemastore.org/yamllint.json

your:
  normal: yaml goes here
like image 105
Roman Avatar answered Sep 03 '25 17:09

Roman


I solved this when I disabled this option in VSCode settings.

enter image description here

like image 32
akonovalov Avatar answered Sep 03 '25 15:09

akonovalov