Skip to content

Add a link to config json-schema #5090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: latest
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ groups:
instance001:
iproto:
listen:
- uri: '127.0.0.1:3301'
- uri: '127.0.0.1:3301'
Original file line number Diff line number Diff line change
@@ -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'
11 changes: 10 additions & 1 deletion doc/platform/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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:

Expand Down
Binary file added doc/platform/images/yaml-annotated.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.