Skip to content

Commit 7d73175

Browse files
authored
Add a link to config json-schema (#5090)
Closes gh-5087
1 parent 93ba1b2 commit 7d73175

File tree

4 files changed

+25
-4
lines changed

4 files changed

+25
-4
lines changed

doc/code_snippets/snippets/config/instances.enabled/instance_scope/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ groups:
66
instance001:
77
iproto:
88
listen:
9-
- uri: '127.0.0.1:3301'
9+
- uri: '127.0.0.1:3301'
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# yaml-language-server: $schema=https://download.tarantool.org/tarantool/schema/config.schema.json
2+
3+
groups:
4+
group001:
5+
replicasets:
6+
replicaset001:
7+
instances:
8+
instance001:
9+
iproto:
10+
listen:
11+
- uri: '127.0.0.1:3301'

doc/platform/configuration.rst

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ You can flexibly configure a cluster's settings on different levels: from global
6060

6161
.. NOTE::
6262

63-
All the available options are documented in the :ref:`Configuration reference <configuration_reference>`.
63+
All the available options are documented in the :ref:`Configuration reference <configuration_reference>`.
6464

6565

6666
.. _configuration_file:
@@ -77,7 +77,7 @@ Basic instance configuration
7777

7878
The example below shows a sample configuration of a single Tarantool instance:
7979

80-
.. literalinclude:: /code_snippets/snippets/config/instances.enabled/instance_scope/config.yaml
80+
.. literalinclude:: /code_snippets/snippets/config/instances.enabled/instance_scope/config_annotated.yaml
8181
:language: yaml
8282
:dedent:
8383

@@ -86,6 +86,16 @@ The example below shows a sample configuration of a single Tarantool instance:
8686
- The ``replicasets`` section contains one replica set named *replicaset001*.
8787
- The ``groups`` section contains one group named *group001*.
8888

89+
.. NOTE::
90+
91+
The initial line in this sample contains a link to an annotated Tarantool configuration
92+
schema for a YAML language server (e.g. for `LSP-Yaml`).
93+
With this link you can set up your code editor (VScode, Neovim, Sublime, etc.) to get
94+
full-text annotations and completion prompts upon ``Alt+ESC`` (Linux) / ``Option+ESC`` (MacOS)
95+
when you work with Tarantool configuration.
96+
97+
.. image:: images/yaml-annotated.png
98+
:align: center
8999

90100
.. _configuration_scopes:
91101

@@ -436,7 +446,7 @@ To see all the supported environment variables, execute the ``tarantool`` comman
436446
437447
.. NOTE::
438448

439-
There are also special ``TT_INSTANCE_NAME`` and ``TT_CONFIG`` environment variables that can be used to :ref:`start <configuration_run_instance_tarantool>` the specified Tarantool instance with configuration from the given file.
449+
There are also special ``TT_INSTANCE_NAME`` and ``TT_CONFIG`` environment variables that can be used to :ref:`start <configuration_run_instance_tarantool>` the specified Tarantool instance with configuration from the given file.
440450

441451
Below are a few examples that show how to set environment variables of different types, like *string*, *number*, *array*, or *map*.
442452

192 KB
Loading

0 commit comments

Comments
 (0)