From 761377a0e3cb2921d95bca5a599cf424a01d4569 Mon Sep 17 00:00:00 2001 From: Arthur Deierlein <110528300+c0rydoras@users.noreply.github.com> Date: Tue, 19 Mar 2024 15:07:44 +0100 Subject: [PATCH] feat: add suport for helm charts (#9900) --- book/src/generated/lang-support.md | 1 + languages.toml | 12 +++++++++++- runtime/queries/helm/highlights.scm | 1 + runtime/queries/helm/injections.scm | 1 + 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 runtime/queries/helm/highlights.scm create mode 100644 runtime/queries/helm/injections.scm diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index 3820c39dbca2..47f8057e006f 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -74,6 +74,7 @@ | haskell-persistent | ✓ | | | | | hcl | ✓ | ✓ | ✓ | `terraform-ls` | | heex | ✓ | ✓ | | `elixir-ls` | +| helm | ✓ | | | `helm_ls` | | hocon | ✓ | | ✓ | | | hoon | ✓ | | | | | hosts | ✓ | | | | diff --git a/languages.toml b/languages.toml index ff25e018fbfd..ccd546fa7de7 100644 --- a/languages.toml +++ b/languages.toml @@ -99,6 +99,7 @@ zls = { command = "zls" } blueprint-compiler = { command = "blueprint-compiler", args = ["lsp"] } typst-lsp = { command = "typst-lsp" } pkgbuild-language-server = { command = "pkgbuild-language-server" } +helm_ls = { command = "helm_ls", args = ["serve"] } [language-server.ansible-language-server] command = "ansible-language-server" @@ -3380,4 +3381,13 @@ language-servers = [ { except-features = [ "diagnostics", ], name = "bash-language-server" }, -] \ No newline at end of file +] + +[[language]] +name = "helm" +grammar = "gotmpl" +scope = "source.helm" +roots = ["Chart.yaml"] +comment-token = "#" +language-servers = ["helm_ls"] +file-types = [ { glob = "templates/*.yaml" }, { glob = "templates/_helpers.tpl"}, { glob = "templates/NOTES.txt" } ] \ No newline at end of file diff --git a/runtime/queries/helm/highlights.scm b/runtime/queries/helm/highlights.scm new file mode 100644 index 000000000000..6ffb4b7d467b --- /dev/null +++ b/runtime/queries/helm/highlights.scm @@ -0,0 +1 @@ +; inherits: gotmpl diff --git a/runtime/queries/helm/injections.scm b/runtime/queries/helm/injections.scm new file mode 100644 index 000000000000..6ffb4b7d467b --- /dev/null +++ b/runtime/queries/helm/injections.scm @@ -0,0 +1 @@ +; inherits: gotmpl