question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

A way to disable schema loading for a specific file using modeline

See original GitHub issue

Sometimes I want to be able to create a YAML file without a schema, for example to hold generic config. In some cases the naming of this file would match some generic pattern, and yaml-language-server will then try to validate this file against that schema. My editor is then filled with validation errors and bogus autocomplete suggestions.

I wish I could use the modeline to declare that this file is without a schema.

# Some ideas:
# yaml-language-server: $schema=none
# yaml-language-server: disable
# yaml-language-server: schemaless

I already tried the following, none of which worked:

# yaml-language-server: $schema=/dev/null
# yaml-language-server: $schema=null
# yaml-language-server: $schema=undefined
# yaml-language-server: $schema=

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:4
  • Comments:5

github_iconTop GitHub Comments

1reaction
calexandrecommented, Sep 28, 2021

I use VSCode, but it would be nice to be able to disable the schema validation inline…

1reaction
evidolobcommented, May 19, 2021

@Mange it is setting for yaml language server, not sure what IDE/Editor you are using, but it should support passing preferences for language servers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to configure YAML schema to make editing files easier
Most IDEs provide ways to associate a schema to a specific file via preferences. In this case, the burden is on your user....
Read more >
redhat-developer/yaml-language-server - GitHub
yaml.completion : Enable/disable autocompletion; yaml.schemas : Helps you associate schemas with files in a glob pattern; yaml.schemaStore.
Read more >
Db2 - LOAD command - IBM
The LOAD command loads data at the page level, bypasses trigger firing and logging, and delays constraint checking and index building until after...
Read more >
SQLite DOT(.) COMMANDS - w3resource
The dot-command must be entirely contained on a single input line. ... FILE Restore content of DB (default "main") from FILE.
Read more >
Command Line Shell For SQLite
If the named file does not exist, a new database file with the given name ... of an SQLITE_LIMIT .lint OPTIONS Report potential...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found