From f86e934de95ed2eacc9f8fe618c7aa4f60837106 Mon Sep 17 00:00:00 2001 From: Tom Zaspel Date: Thu, 30 Apr 2026 19:15:37 +0200 Subject: [PATCH 1/5] feat: add all helm functions --- languages/helm/highlights.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languages/helm/highlights.scm b/languages/helm/highlights.scm index 943e2bf..6186c70 100644 --- a/languages/helm/highlights.scm +++ b/languages/helm/highlights.scm @@ -24,7 +24,7 @@ ; Builtin functions ((identifier) @function.builtin - (#match? @function.builtin "^(and|call|html|index|slice|js|len|not|or|print|printf|println|urlquery|eq|ne|lt|ge|gt|ge|indent|nindent|toYaml|toJson|trim|b64enc|b64dec|default)$")) + (#match? @function.builtin "^(abbrev|abbrevboth|add|add1|add1f|addf|adler32sum|ago|and|append|atoi|b32dec|b32enc|b64dec|b64enc|base|buildCustomCert|camelcase|call|cat|ceil|chunk|clean|coalesce|compact|concat|contains|date|dateInZone|dateModify|decryptAES|deepCopy|deepEqual|default|derivePassword|dict|dig|dir|div|divf|duration|durationRound|empty|encryptAES|eq|ext|fail|first|float64|floor|fromJson|fromJsonArray|fromYaml|fromYamlArray|ge|genCA|genPrivateKey|genSelfSignedCert|genSignedCert|get|getHostByName|gt|has|hasKey|hasPrefix|hasSuffix|html|htmlDate|htmlDateInZone|htpasswd|index|indent|initials|int|int64|isAbs|js|kebabcase|keys|kindIs|kindOf|last|le|len|list|lookup|lower|lt|max|maxf|merge|mergeOverwrite|min|minf|mod|mul|mulf|mustAppend|mustCompact|mustDateModify|mustDeepCopy|mustFirst|mustHas|mustInitial|mustLast|mustMerge|mustMergeOverwrite|mustPrepend|mustRegexFind|mustRegexFindAll|mustRegexMatch|mustRegexReplaceAll|mustRegexReplaceAllLiteral|mustRegexSplit|mustRest|mustReverse|mustSlice|mustToDate|mustToJson|mustToPrettyJson|mustToRawJson|mustToToml|mustUniq|mustWithout|ne|nindent|nospace|not|now|omit|or|pick|pluck|plural|prepend|print|printf|println|quote|randAlpha|randAlphaNum|randAscii|randBytes|randNumeric|regexFind|regexFindAll|regexMatch|regexReplaceAll|regexReplaceAllLiteral|regexSplit|repeat|replace|required|rest|reverse|round|semver|semverCompare|seq|set|sha1sum|sha256sum|shuffle|slice|snakecase|squote|sub|subf|substr|swapcase|ternary|title|toDate|toDecimal|toJson|toPrettyJson|toRawJson|toString|toStrings|toToml|toYaml|toYamlPretty|trim|trimAll|trimPrefix|trimSuffix|trunc|typeIs|typeIsLike|typeOf|uniq|unixEpoch|unset|until|untilStep|untitle|upper|urlJoin|urlParse|urlquery|uuidv4|values|without|wrap|wrapWith)$")) ; Delimiters From 6bc8d73aaefa312171cb006e5e7ba84694fe4870 Mon Sep 17 00:00:00 2001 From: Tom Zaspel Date: Thu, 30 Apr 2026 19:25:27 +0200 Subject: [PATCH 2/5] chore: bump version --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1c5f3ed..7a68beb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zed_helm" -version = "0.0.2" +version = "0.0.3" edition = "2021" publish = false license = "Apache-2.0" From 71897ebec736db10f2abd09e7df96e11a0377dd3 Mon Sep 17 00:00:00 2001 From: Tom Zaspel Date: Thu, 30 Apr 2026 19:25:45 +0200 Subject: [PATCH 3/5] docs: improve README.md --- README.md | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e41425c..58ca3e0 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,30 @@ Syntax highlighting for Helm templates using tree-sitter and integration of [hel ## Installation -The extension relies on the PATH environment variable and first looks for 'helm_ls', then 'helm-ls'. If neither is available, an error is shown. +The extension relies on the PATH environment variable and first looks for `helm_ls`, then `helm-ls`. +If neither is available, an error is shown. + +## File Type Association + +Helm template files share the `.yaml`/`.yml` extension with plain YAML files. +Because Zed matches file extensions globally, the extension does **not** +register `.yaml`/`.yml` automatically (doing so would override the built-in YAML +language for every YAML file). + +To get syntax highlighting and the language server for your chart templates, +add the following to your Zed `settings.json`: + +```json +{ + "file_types": { + "Helm": ["yaml", "yml"] + } +} +``` + +> **Tip:** If you work with both plain YAML and Helm files, you can keep the +> default YAML association and switch individual files manually via the +> language selector in the status bar. ## Configuration @@ -36,10 +59,10 @@ https://github.com/ngalaiko/tree-sitter-go-template Every time the extension is released: -1. **Bump the Version:** +1. **Bump the Version:** Update the version number in Cargo.toml and extension.toml. -2. **Update Extension Index:** +2. **Update Extension Index:** After releasing, update the extension entry in [zed-industries/extensions](http://github.com/zed-industries/extensions/) to reflect the new version. This ensures users always have access to the latest From ac1008231e6ae7fc57a00c523ab39d0dc7c03bd8 Mon Sep 17 00:00:00 2001 From: Tom Zaspel Date: Thu, 30 Apr 2026 19:26:03 +0200 Subject: [PATCH 4/5] feat: add new treesitter functions --- README.md | 4 ++-- languages/helm/config.toml | 2 ++ languages/helm/outline.scm | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 languages/helm/outline.scm diff --git a/README.md b/README.md index 58ca3e0..586d7f7 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ Syntax highlighting for Helm templates using tree-sitter and integration of [hel ## Installation -The extension relies on the PATH environment variable and first looks for `helm_ls`, then `helm-ls`. -If neither is available, an error is shown. +The extension relies on the PATH environment variable and first looks for +`helm_ls`, then `helm-ls`. If neither is available, an error is shown. ## File Type Association diff --git a/languages/helm/config.toml b/languages/helm/config.toml index f153caf..5cd1360 100644 --- a/languages/helm/config.toml +++ b/languages/helm/config.toml @@ -2,6 +2,8 @@ name = "Helm" grammar = "helm" line_comments = ["# "] path_suffixes = [".helmignore"] +tab_size = 2 +word_characters = ["-"] block_comment = ["{{/* ", " */}}"] brackets = [ { start = "{{", end = "}}", close = true, newline = false }, diff --git a/languages/helm/outline.scm b/languages/helm/outline.scm new file mode 100644 index 0000000..9e8c1ba --- /dev/null +++ b/languages/helm/outline.scm @@ -0,0 +1,15 @@ +; Named template definitions: {{- define "mychart.labels" -}} ... {{- end }} +; Both quoted ("name") and backtick (`name`) string forms are handled. +(define_action + name: [ + (interpreted_string_literal) + (raw_string_literal) + ] @name) @item + +; Block definitions: {{- block "mychart.body" . -}} ... {{- end }} +; `block` is like `define` but with a fallback body — also worth showing in the outline. +(block_action + name: [ + (interpreted_string_literal) + (raw_string_literal) + ] @name) @item From 726426c108e05ed1a700fc48b14d354258bb2ed6 Mon Sep 17 00:00:00 2001 From: Tom Zaspel Date: Mon, 18 May 2026 15:47:06 +0200 Subject: [PATCH 5/5] docs: remove wrong documentation --- README.md | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 586d7f7..f722fc3 100644 --- a/README.md +++ b/README.md @@ -4,34 +4,13 @@ Syntax highlighting for Helm templates using tree-sitter and integration of [hel ## Installation -The extension relies on the PATH environment variable and first looks for -`helm_ls`, then `helm-ls`. If neither is available, an error is shown. - -## File Type Association - -Helm template files share the `.yaml`/`.yml` extension with plain YAML files. -Because Zed matches file extensions globally, the extension does **not** -register `.yaml`/`.yml` automatically (doing so would override the built-in YAML -language for every YAML file). - -To get syntax highlighting and the language server for your chart templates, -add the following to your Zed `settings.json`: - -```json -{ - "file_types": { - "Helm": ["yaml", "yml"] - } -} -``` - -> **Tip:** If you work with both plain YAML and Helm files, you can keep the -> default YAML association and switch individual files manually via the -> language selector in the status bar. +The extension relies on the PATH environment variable and first looks for 'helm_ls', +then 'helm-ls'. If neither is available, an error is shown. ## Configuration -This is an example of providing configuration for the language server via Zed's `settings.json`. For full reference of possible values, refer to [helm-ls configuration section](https://github.com/mrjosh/helm-ls/?tab=readme-ov-file#configuration-options). +This is an example of providing configuration for the language server via Zed's `settings.json`. +For full reference of possible values, refer to [helm-ls configuration section](https://github.com/mrjosh/helm-ls/?tab=readme-ov-file#configuration-options). ```json {