Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "zed_helm"
version = "0.0.2"
version = "0.0.3"
edition = "2021"
publish = false
license = "Apache-2.0"
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +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.
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
{
Expand Down Expand Up @@ -36,10 +38,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
2 changes: 2 additions & 0 deletions languages/helm/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
2 changes: 1 addition & 1 deletion languages/helm/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
15 changes: 15 additions & 0 deletions languages/helm/outline.scm
Original file line number Diff line number Diff line change
@@ -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