-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #222 1. Create a json schema 2. Add its URL to schemastore. Now the json schema is added to this repo. I'll send a PR to add the URL of this json schema to [schema store](https://github.com/SchemaStore/schemastore)
- Loading branch information
Showing
2 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ | ||
"$comment": "https://github.com/nix-community/nixd/blob/main/docs/user-guide.md#configuration", | ||
"$id": "https://json.schemastore.org/nixd-schema.json", | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"definitions": { | ||
"target": { | ||
"description": "Nix installables that will be used for root translation unit.", | ||
"type": "object", | ||
"properties": { | ||
"args": { | ||
"description": "Accept args as \"nix eval\"", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"installable": { | ||
"description": "\"nix eval\"", | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"properties": { | ||
"eval": { | ||
"description": "The evaluation section, provide auto completion for dynamic bindings.", | ||
"type": "object", | ||
"properties": { | ||
"target": { | ||
"$ref": "#/definitions/target" | ||
}, | ||
"depth": { | ||
"description": "Extra depth for evaluation", | ||
"type": "integer", | ||
"default": 0 | ||
}, | ||
"workers": { | ||
"description": "The number of workers for evaluation task. defaults to std::thread::hardware_concurrency", | ||
"type": "integer" | ||
} | ||
} | ||
}, | ||
"formatting": { | ||
"command": { | ||
"description": "Which command you would like to do formatting", | ||
"default": "nixpkgs-fmt", | ||
"type": "string" | ||
} | ||
}, | ||
"options": { | ||
"description": "Tell the language server your desired option set, for completion. This is lazily evaluated.", | ||
"type": "object", | ||
"properties": { | ||
"enable": { | ||
"description": "Enable option completion task. If you are writing a package, disable this", | ||
"type": "boolean", | ||
"default": "false" | ||
}, | ||
"target": { | ||
"$ref": "#/definitions/target" | ||
} | ||
} | ||
} | ||
}, | ||
"title": "JSON schema for nixd", | ||
"type": "object" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters