taplo: Schemas not working?

I noticed that the Cargo.toml schema hasn’t been working for a while. When I hover a key, no tooltip appears, and I get no useful autocompletion.

I tried out various things: I restarted the extension, I created a evenBetterToml.schema.associations setting and a .taplo.toml file in the workspace that includes the Cargo.toml file. I added the schema taplo://cargo.toml (I also tried https://taplo.tamasfe.dev/schemas/cargo.toml.json and a local copy with file://). Nothing works.

System information:

  • Editor: VS Code OSS 1.58.0
  • Extension: Even Better Toml 0.14.2
  • OS: Manjaro Linux
  • Desktop: KDE 5.86.0 / Plasma 5.22.5

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (9 by maintainers)

Most upvoted comments

I hope that the following error in VS Code is related to this issue, and it helps someone to find it via Google when I post this:

failed to download schema index: error sending request: JsValue(Object({“message”:“request to https://taplo.tamasfe.dev/schema_index.json failed, reason: connect ETIMEDOUT 185.199.110.153:443”,“type”:“system”,“errno”:“ETIMEDOUT”,“code”:“ETIMEDOUT”}))

image

This leads to initial formatting being stuck for about a minute. "evenBetterToml.schema.repositoryEnabled": false helps.

Just to be sure, my settings now contain:

{
    "evenBetterToml.schema.repositoryEnabled": false,
    "evenBetterToml.schema.associations": {
        "^.*(/|\\\\)Cargo\\.toml$": "file:///home/ludwig/Develop/toml-schemas/cargo.toml.json",
        "^.*(/|\\\\)\\.?rustfmt\\.toml$": "file:///home/ludwig/Develop/toml-schemas/rustfmt.toml.json"
    }
}

I downloaded https://taplo.tamasfe.dev/schemas/cargo.toml.json and https://taplo.tamasfe.dev/schemas/rustfmt.toml.json and saved it in ~/Develop/toml-schemas/ for this.

Thanks!

Alright, in order to fix this issue, the following has to be done:

  • update dependencies to trust the new letsencrypt root certificate
  • properly handle (and skip) http schema errors