From 0dfd887bec02efb4eda374495c79791fb5d76215 Mon Sep 17 00:00:00 2001 From: Damian Tarnawski Date: Wed, 24 Jan 2024 23:45:21 +0100 Subject: Add enable_format option to ols.schema.json and readme --- README.md | 6 ++++-- misc/ols.schema.json | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 98e7553..4438706 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ cd ols In order for the language server to index your files, it must know about your collections. -To do that you can either configure ols via an ``ols.json`` file (it should be located at the root of your workspace). +To do that you can either configure ols via an `ols.json` file (it should be located at the root of your workspace). Or you can provide the configuration via your editor of choice. @@ -43,7 +43,7 @@ Example of `ols.json`: { "$schema": "https://raw.githubusercontent.com/DanielGavin/ols/master/misc/ols.schema.json", "collections": [ - { "name": "custom_collection", "path": "c:/path/to/collection" }, + { "name": "custom_collection", "path": "c:/path/to/collection" } ], "enable_semantic_tokens": false, "enable_document_symbols": true, @@ -56,6 +56,8 @@ You can also set `ODIN_ROOT` environment variable to the path where ols should l Options: +`enable_format`: Turns on formatting with `odinfmt`. _(Enabled by default)_ + `enable_hover`: Enables hover feature `enable_snippets`: Turns on builtin snippets diff --git a/misc/ols.schema.json b/misc/ols.schema.json index bc01704..a374681 100644 --- a/misc/ols.schema.json +++ b/misc/ols.schema.json @@ -21,6 +21,11 @@ "type": "boolean", "description": "Turns on outline of all your global declarations in your document." }, + "enable_format": { + "type": "boolean", + "description": "Turns on formatting with odinfmt.", + "default": true + }, "enable_hover": { "type": "boolean", "description": "Enables hover feature" -- cgit v1.2.3