You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+42Lines changed: 42 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ An extension for Visual Studio Code and compatible IDEs that provides autocomple
17
17
### Validation and diagnostics
18
18
-**Frontmatter validation**: Validates frontmatter fields against schema.
19
19
-**Directive syntax validation**: Real-time validation with red underlines and hover cards for errors.
20
+
-**Applies-to validation**: Validates `applies_to` syntax in frontmatter, inline roles, and section-level directives, including version format, range overlaps, and semantic rules.
20
21
-**Substitution validation**: Warns when literal values should be replaced with substitution variables.
21
22
22
23
### Enhanced user experience
@@ -25,6 +26,7 @@ An extension for Visual Studio Code and compatible IDEs that provides autocomple
25
26
-**Enhanced completion tooltips**: Get full variable values when selecting from autocompletion.
26
27
-**Syntax highlighting**: Enhanced syntax highlighting for directives, parameters, roles, substitution variables, and mutation operators that works alongside standard Markdown highlighting.
27
28
-**Built-in versions**: Automatically fetches and caches version substitutions from the docs-builder repository, available as `{{version.*}}` variables with autocompletion support.
29
+
-**Vale style guide updates**: Automatically checks for updates to the [Elastic Vale style guide](https://github.com/elastic/vale-rules) and notifies you when a new version is available.
28
30
29
31
## Inline roles
30
32
@@ -39,6 +41,27 @@ Use `{kbd}` to format keyboard shortcuts. Type `{kbd}` followed by a backtick to
39
41
### Applies-to roles
40
42
Use `{applies_to}` to specify product or deployment applicability. Type `{applies_to}` followed by a backtick to see available product keys and lifecycle states.
41
43
44
+
**Version syntax options:**
45
+
46
+
```markdown
47
+
{applies_to}`stack: ga 9.1` # 9.1+ (implicit, greater than or equal)
48
+
{applies_to}`stack: ga 9.1+` # 9.1+ (explicit)
49
+
{applies_to}`stack: preview 9.0-9.2` # Version range (9.0 through 9.2)
50
+
{applies_to}`stack: beta =9.1` # Exact version only
51
+
```
52
+
53
+
**Multiple lifecycle entries:**
54
+
55
+
```markdown
56
+
{applies_to}`stack: preview 9.0-9.1, ga 9.2+`
57
+
{applies_to}`elasticsearch: preview 9.0-9.1, ga 9.2-9.5, deprecated 9.6+`
58
+
```
59
+
60
+
**Validation rules:**
61
+
- Version ranges must not overlap within the same key.
62
+
- Only one unbound value (with `+`) is allowed per key.
63
+
- The extension provides hints for implicit version syntax and suggests explicit `+` or `=`.
64
+
42
65
### Subs roles
43
66
Use `{subs}` for inline code that contains substitution variables. Type `{subs}` followed by a backtick, then use `{{variable}}` syntax with full autocompletion and mutation support.
-`{tab-set}` and `{tab-item}` - Tabbed content (supports `:group:` and `:sync:`)
59
82
-`{stepper}` and `{step}` - Step-by-step guides
60
83
-`{applies-switch}` and `{applies-item}` - Tabbed content with applies_to badges
84
+
-`{applies_to}` - Section-level applicability markers with version syntax support
61
85
62
86
### Media and visuals
63
87
-`{image}` - Images with alt text and sizing options
@@ -132,6 +156,23 @@ If you need to refresh the versions cache manually:
132
156
133
157
The versions are sourced from the `versions.yml` file in the docs-builder repository and include all versioning systems defined there, such as stack versions, product-specific versions, and more.
134
158
159
+
### Vale style guide update notifications
160
+
161
+
If you have the [Elastic Vale style guide](https://github.com/elastic/vale-rules) installed locally, the extension automatically checks for updates when it activates. When a new version is available, a notification appears with two options:
162
+
163
+
-**Update**: Runs the appropriate install script for your operating system in the integrated terminal.
164
+
-**More Info**: Opens the vale-rules repository in your browser to view release notes and documentation.
165
+
166
+
**Notes:**
167
+
- The check only runs if Vale is installed locally (the extension looks for the VERSION file in the standard installation path).
168
+
- If Vale is not installed, no notification is shown.
169
+
- The check runs asynchronously and fails silently if the network is unavailable, so it never affects extension performance.
170
+
171
+
**Manual check:**
172
+
If you want to manually check for Vale style guide updates:
173
+
1. Press `Ctrl/Cmd+Shift+P` to open the Command Palette.
174
+
2. Run **Elastic Docs: Check for Vale Style Guide Updates**.
175
+
135
176
### Substitution validation and quick fixes
136
177
137
178
The extension automatically detects when you're using literal values that can be replaced with substitution variables. For example, if you have a substitution variable `{{product.apm}}` defined in your `docset.yml` file with the value "APM", the extension shows a warning when you type "APM" directly in your content, suggesting you use `{{product.apm}}` instead.
@@ -161,6 +202,7 @@ This helps maintain consistency across your documentation and makes it easier to
161
202
- Notice validation warnings for literal values that could use substitutions
162
203
- Hover over variables with mutations to see transformation previews
163
204
- Use the Command Palette to manually refresh versions cache if needed
205
+
- If you have Vale installed, watch for update notifications when new style guide versions are released
0 commit comments