Skip to content

Config file schema directive is incompatible with TOML linters and language servers available #6892

@uchoa

Description

@uchoa

Description

Considering Taplo and Tombi as good examples of schema validation implementation, both define the schema to be used with a TOML file with the following format:

#:schema https://jj-vcs.github.io/jj/latest/config-schema.json

while the config file template used by jj is:

"$schema" = "https://jj-vcs.github.io/jj/latest/config-schema.json"

Steps to Reproduce the Problem

  1. jj config set [--user/--repo] KEY VALUE
  2. Open the corresponding config file for editing

Expected Behavior

My editor using a TOML linter/language server should be able to validate the configuration against the referenced schema.

Actual Behavior

The linter/language server doesn't validate the file due to the unexpected format used to reference the schema.

Specifications

  • Platform: Linux + Neovim + [Taplo | Tombi]
  • Version: jj 0.30.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    polish🪒🐃Make existing features more convenient and more consistent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions