aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamian Tarnawski <gthetarnav@gmail.com>2023-06-11 22:40:29 +0200
committerDamian Tarnawski <gthetarnav@gmail.com>2023-06-11 22:40:29 +0200
commitd2395375f576acca1290e4bc0aedfeb61e871f5a (patch)
treefe7c3e1b829557397ccce8e0195c81fa3279646f
parent96730e2a5306674b70d998330408fa74bc79302c (diff)
Add json schemas for config files
-rw-r--r--misc/odinfmt.schema.json51
-rw-r--r--misc/ols.schema.json70
2 files changed, 121 insertions, 0 deletions
diff --git a/misc/odinfmt.schema.json b/misc/odinfmt.schema.json
new file mode 100644
index 0000000..3ca33f7
--- /dev/null
+++ b/misc/odinfmt.schema.json
@@ -0,0 +1,51 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "type": "object",
+ "properties": {
+ "character_width": {
+ "type": "integer",
+ "default": 100,
+ "description": "How many characters it takes before it line breaks it."
+ },
+ "spaces": {
+ "type": "integer",
+ "default": 4,
+ "description": "Spaces per indentation"
+ },
+ "newline_limit": {
+ "type": "integer",
+ "default": 2,
+ "description": "The limit of newlines between statements and declarations."
+ },
+ "tabs": {
+ "type": "boolean",
+ "default": true,
+ "description": "Use tabs instead of spaces"
+ },
+ "tabs_width": {
+ "type": "integer",
+ "default": 4,
+ "description": "How many characters one tab represents"
+ },
+ "convert_do": {
+ "type": "boolean",
+ "default": false,
+ "description": "Convert all do statements to brace blocks"
+ },
+ "brace_style": {
+ "type": "string",
+ "enum": ["_1TBS", "Allman", "Stroustrup", "K_And_R"],
+ "default": "_1TBS"
+ },
+ "indent_cases": {
+ "type": "boolean",
+ "default": false
+ },
+ "newline_style": {
+ "type": "string",
+ "enum": ["CRLF", "LF"],
+ "default": "CRLF"
+ }
+ },
+ "required": []
+}
diff --git a/misc/ols.schema.json b/misc/ols.schema.json
new file mode 100644
index 0000000..802f9e3
--- /dev/null
+++ b/misc/ols.schema.json
@@ -0,0 +1,70 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "type": "object",
+ "properties": {
+ "workspace_folders": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": { "type": "string" },
+ "uri": { "type": "string" }
+ }
+ }
+ },
+ "collections": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": { "type": "string" },
+ "path": { "type": "string" }
+ }
+ }
+ },
+ "completion_support_md": { "type": "boolean" },
+ "hover_support_md": { "type": "boolean" },
+ "signature_offset_support": { "type": "boolean" },
+ "running": { "type": "boolean" },
+ "verbose": {
+ "type": "boolean",
+ "description": "Logs warnings instead of just errors."
+ },
+ "enable_format": { "type": "boolean" },
+ "enable_hover": {
+ "type": "boolean",
+ "description": "Enables hover feature"
+ },
+ "enable_document_symbols": {
+ "type": "boolean",
+ "description": "Turns on outline of all your global declarations in your document."
+ },
+ "enable_semantic_tokens": {
+ "type": "boolean",
+ "description": "Turns on syntax highlighting."
+ },
+ "enable_inlay_hints": { "type": "boolean" },
+ "enable_procedure_context": { "type": "boolean" },
+ "enable_snippets": {
+ "type": "boolean",
+ "description": "Turns on builtin snippets"
+ },
+ "enable_references": { "type": "boolean" },
+ "enable_rename": { "type": "boolean" },
+ "enable_label_details": { "type": "boolean" },
+ "enable_std_references": { "type": "boolean" },
+ "enable_import_fixer": { "type": "boolean" },
+ "disable_parser_errors": { "type": "boolean" },
+ "thread_count": { "type": "integer" },
+ "file_log": { "type": "boolean" },
+ "odin_command": {
+ "type": "string",
+ "description": "Allows you to specify your Odin location, instead of just relying on the environment path."
+ },
+ "checker_args": {
+ "type": "string",
+ "description": "Pass custom arguments to `odin check`."
+ }
+ },
+ "required": []
+}