Skip to content

Commit

Permalink
docs: add features overview and zed to README (#113)
Browse files Browse the repository at this point in the history
* chore: add features to README

* chore: demos of features in readme

* docs: cleanup

* docs: add zed extension

* docs: add demo to heading
  • Loading branch information
qvalentin authored Oct 27, 2024
1 parent 5b1dcc4 commit af73597
Showing 1 changed file with 77 additions and 0 deletions.
77 changes: 77 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ Helm-ls is a [helm](https://github.com/helm/helm) language server protocol [LSP]
- [nvim-lspconfig setup](#nvim-lspconfig-setup)
- [coc.nvim setup](#cocnvim-setup)
- [VSCode](#vscode)
- [Zed](#zed)
- [Emacs eglot setup](#emacs-eglot-setup)
- [Features and Demos](#features-and-demos)
- [Contributing](#contributing)
- [License](#license)

Expand Down Expand Up @@ -270,6 +272,10 @@ Save the configuration file and then either restart Neovim or type `:CocRestart`

Check out the [helm-ls-vscode extension](https://github.com/qvalentin/helm-ls-vscode) for more details.

### Zed

Setup filetypes as described in the [Zed Docs](https://zed.dev/docs/languages/helm) and install the [helm.zed extension](https://github.com/cabrinha/helm.zed).

### Emacs eglot setup

Integrating helm-ls with [eglot](https://github.com/joaotavora/eglot) for emacs consists of two steps: wiring up Helm template files into a specific major mode and then associating that major mode with `helm_ls` via the `eglot-server-programs` variable.
Expand Down Expand Up @@ -304,6 +310,77 @@ Alternatively, you can include a comment such as the following at the top of Hel

# -*- mode: helm -*-

## Features and Demos

<details>
<summary>
<b>Hover</b>
</summary>

<video alt="demo for hover" src="https://github.com/user-attachments/assets/48413b5b-aedf-4735-aeca-aff32553f3fd"></video>

| Language Construct | Example Effect |
| ------------------ | ---------------------------------------------------------------------------------- |
| Values | `.Values.replicaCount` shows the value of `replicaCount` in the values.yaml files. |
| Built-In-Objects | `.Chart.Name` shows the name of the Chart. |
| Includes | `include "example.labels"` shows the defintion of the template. |
| Functions | `add` shows the docs of the add function. |
| Yaml in Templates | `Kind` shows the docs from the yaml-schema (via yaml-language-server). |

</details>

<details>
<summary>
<b>Autocomplete</b>
</summary>

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

| Language Construct | Effect |
| ------------------ | -------------------------------------------------------------------- |
| Values | Values from `values*.yaml` files (including child/parent Charts). |
| Built-In-Objects | Values from `Chart`, `Release`, `Files`, `Capabilities`, `Template`. |
| Includes | Available includes (including child/parent Charts). |
| Functions | Functions from gotemplate and helm. |
| Yaml in Templates | Values from the yaml-schema (via yaml-language-server). |

</details>

<details>
<summary>
<b>Go-To-Definition/References</b>
</summary>

<video alt="Demo for definition and references" src="https://github.com/user-attachments/assets/e49769e9-4ddb-4b05-b075-645a9f9b9937"></video>

| Language Construct | Effect |
| ------------------ | ----------------------------------------------------------------------------------- |
| Values | Go to `values*.yaml` files for template references (including child/parent Charts). |
| Built-In-Objects | Go to `Chart.yaml` for `Chart.*`. |
| Includes | Go to defintion/references of template (including child/parent Charts). |

</details>

<details>
<summary>
<b>Symbol</b>
</summary>

Can show a breadcrumb of the yaml path of the current position (via yaml-language-server).
![Demo for Symbol](https://github.com/user-attachments/assets/0b8a9fc4-4625-4641-a296-8aedb48496e9)

</details>

<details>
<summary>
<b>Linting</b>
</summary>

Diagnostics from both helm lint and yaml-language-server.
![Demo of Linting](https://github.com/user-attachments/assets/58e90dd4-2fe5-40f5-a9a7-adec6c890a0c)

</details>

## Contributing

Thank you for considering contributing to Helm-ls project!
Expand Down

0 comments on commit af73597

Please sign in to comment.