1

If you read the documentation for lsp-mode-lsp-json here, this is the section that deals with setting schemas:

Available configurations

lsp-json-schemas

Default: nil

Associate schemas to JSON files in the current project

I have no idea how to use that. Is there an example somewhere?

lsp-json-schemas is a variable defined in ‘lsp-json.el’.

Its value is nil

Documentation:

Associate schemas to JSON files in the current project

You can customize this variable.

This variable was introduced, or its default value was changed, in version 6.3 of the lsp-mode package.

I googled, but can't find an example of how to use this variable anywhere.

0

I still don't know how to use the lsp-json-schemas variable, but with this mode properly activated in emacs you can add a top-level $schema property to the object you are presumably editing in the file and the auto-completions and other features will kick in.

{
   "$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/master/schema.json",
   "basics": { "name": "Pieter", "email": "some@email.com", ... },
   ...
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.