Skip to content

Commit 2e67939

Browse files
authored
feat: docs about values-files support (#141)
1 parent 1605237 commit 2e67939

File tree

1 file changed

+27
-9
lines changed

1 file changed

+27
-9
lines changed

README.md

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,14 @@ Helm-ls is a [helm](https://github.com/helm/helm) language server protocol [LSP]
2727
- [Manual download](#manual-download)
2828
- [Make it executable](#make-it-executable)
2929
- [Integration with yaml-language-server](#integration-with-yaml-language-server)
30+
- [Template files](#template-files)
31+
- [Values files](#values-files)
32+
- [Install](#install)
33+
- [Custom Schemas](#custom-schemas)
3034
- [Dependency Charts](#dependency-charts)
3135
- [Configuration options](#configuration-options)
3236
- [General](#general)
33-
- [Values Files](#values-files)
37+
- [Values Files](#values-files-1)
3438
- [yaml-language-server config](#yaml-language-server-config)
3539
- [Default Configuration](#default-configuration)
3640
- [Editor Config examples](#editor-config-examples)
@@ -122,21 +126,34 @@ chmod +x /usr/local/bin/helm_ls
122126

123127
Helm-ls will use yaml-language-server to provide additional capabilities, if it is installed.
124128

129+
#### Template files
130+
131+
Helm-ls will convert the gotemplate files in the templates directory to yaml and process them with yaml-language-server.
132+
125133
> [!WARNING]
126134
>
127135
> This feature is experimental, you can disable it in the config ([see](#configuration-options)) if you are getting a lot of errors beginning with `Yamlls:`.
128136
> Having a broken template syntax (e.g. while your are still typing) will also cause diagnostics from yaml-language-server to be shown as errors.
129137
130-
To install it using npm run (or use your preferred package manager):
138+
#### Values files
139+
140+
Helm-ls will generate json-schemas for all values.\*yaml files and use yaml-language-server to provide autocompletion.
141+
This feature is currently beta, see https://github.com/mrjosh/helm-ls/issues/61#issuecomment-2927585818 for details.
142+
143+
#### Install
131144

132145
```bash
133146
npm install --global yaml-language-server
134147
```
135148

149+
To install it using npm run (or use your preferred package manager):
150+
136151
The default kubernetes schema of yaml-language-server will be used for all files. You can overwrite which schema to use in the config ([see](#configuration-options)).
137152
If you are for example using CRDs that are not included in the default schema, you can overwrite the schema using a comment
138153
to use the schemas from the [CRDs-catalog](https://github.com/datreeio/CRDs-catalog).
139154

155+
#### Custom Schemas
156+
140157
```yaml
141158
# yaml-language-server: $schema=https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/keda.sh/scaledobject_v1alpha1.json
142159
apiVersion: keda.sh/v1alpha1
@@ -338,13 +355,14 @@ Alternatively, you can include a comment such as the following at the top of Hel
338355

339356
<video alt="Demo for autocompletion" src="https://github.com/user-attachments/assets/15c57a0a-4a17-48b4-9861-a324bcfa2158"></video>
340357

341-
| Language Construct | Effect |
342-
| ------------------ | -------------------------------------------------------------------- |
343-
| Values | Values from `values*.yaml` files (including child/parent Charts). |
344-
| Built-In-Objects | Values from `Chart`, `Release`, `Files`, `Capabilities`, `Template`. |
345-
| Includes | Available includes (including child/parent Charts). |
346-
| Functions | Functions from gotemplate and helm. |
347-
| Yaml in Templates | Values from the yaml-schema (via yaml-language-server). |
358+
| Language Construct (or filetype) | Effect |
359+
| ------------------------------------- | -------------------------------------------------------------------------- |
360+
| Values | Values from `values*.yaml` files (including child/parent Charts). |
361+
| Built-In-Objects | Values from `Chart`, `Release`, `Files`, `Capabilities`, `Template`. |
362+
| Includes | Available includes (including child/parent Charts). |
363+
| Functions | Functions from gotemplate and helm. |
364+
| Yaml in Templates | Values from the yaml-schema (via yaml-language-server). |
365+
| [values.\*.yaml files](#values-files) | Values from other values files either from the same Chart or other Charts. |
348366

349367
</details>
350368

0 commit comments

Comments
 (0)