Skip to content

Commit

Permalink
Add enable_format option to ols.schema.json and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
thetarnav committed Jan 24, 2024
1 parent e536b93 commit 0dfd887
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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,
Expand All @@ -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
Expand Down
5 changes: 5 additions & 0 deletions misc/ols.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 0dfd887

Please sign in to comment.