diff --git a/doc/code_snippets/snippets/config/instances.enabled/instance_scope/config.yaml b/doc/code_snippets/snippets/config/instances.enabled/instance_scope/config.yaml index 69ccf58c8c..7aeaa6ed21 100644 --- a/doc/code_snippets/snippets/config/instances.enabled/instance_scope/config.yaml +++ b/doc/code_snippets/snippets/config/instances.enabled/instance_scope/config.yaml @@ -6,4 +6,4 @@ groups: instance001: iproto: listen: - - uri: '127.0.0.1:3301' \ No newline at end of file + - uri: '127.0.0.1:3301' diff --git a/doc/code_snippets/snippets/config/instances.enabled/instance_scope/config_annotated.yaml b/doc/code_snippets/snippets/config/instances.enabled/instance_scope/config_annotated.yaml new file mode 100644 index 0000000000..610e8ec76f --- /dev/null +++ b/doc/code_snippets/snippets/config/instances.enabled/instance_scope/config_annotated.yaml @@ -0,0 +1,11 @@ +# yaml-language-server: $schema=https://download.tarantool.org/tarantool/schema/config.schema.json + +groups: + group001: + replicasets: + replicaset001: + instances: + instance001: + iproto: + listen: + - uri: '127.0.0.1:3301' diff --git a/doc/platform/configuration.rst b/doc/platform/configuration.rst index f19763bba2..e60fea294b 100644 --- a/doc/platform/configuration.rst +++ b/doc/platform/configuration.rst @@ -60,7 +60,7 @@ You can flexibly configure a cluster's settings on different levels: from global .. NOTE:: - All the available options are documented in the :ref:`Configuration reference `. + All the available options are documented in the :ref:`Configuration reference `. .. _configuration_file: @@ -77,7 +77,7 @@ Basic instance configuration The example below shows a sample configuration of a single Tarantool instance: -.. literalinclude:: /code_snippets/snippets/config/instances.enabled/instance_scope/config.yaml +.. literalinclude:: /code_snippets/snippets/config/instances.enabled/instance_scope/config_annotated.yaml :language: yaml :dedent: @@ -86,6 +86,15 @@ The example below shows a sample configuration of a single Tarantool instance: - The ``replicasets`` section contains one replica set named *replicaset001*. - The ``groups`` section contains one group named *group001*. +.. NOTE:: + + The initial line in this sample contains a link to an annotated Tarantool configuration + schema for a YAML language server (e.g. for `LSP-Yaml`). + With this link you can set up your code editor (VScode, Neovim, Sublime, etc.) to get + full-text annotations and completion prompts when you work with Tarantool configuration. + +.. image:: images/yaml-annotated.png + :align: center .. _configuration_scopes: @@ -436,7 +445,7 @@ To see all the supported environment variables, execute the ``tarantool`` comman .. NOTE:: - There are also special ``TT_INSTANCE_NAME`` and ``TT_CONFIG`` environment variables that can be used to :ref:`start ` the specified Tarantool instance with configuration from the given file. + There are also special ``TT_INSTANCE_NAME`` and ``TT_CONFIG`` environment variables that can be used to :ref:`start ` the specified Tarantool instance with configuration from the given file. Below are a few examples that show how to set environment variables of different types, like *string*, *number*, *array*, or *map*. diff --git a/doc/platform/images/yaml-annotated.png b/doc/platform/images/yaml-annotated.png new file mode 100644 index 0000000000..d4eff1e2ea Binary files /dev/null and b/doc/platform/images/yaml-annotated.png differ