Skip to content

Conversation

rchl
Copy link
Member

@rchl rchl commented Oct 2, 2025

As I wrote in #2649 (comment), I'm a little concerned how would that work out for people that use both helm and yaml since both seem to use *.yaml extension...

@jwortmann
Copy link
Member

See my comment in #2649 (comment)

Ideally someone would provide a special syntax for helm template files with base scope source.yaml.pipeline.helm, and then we use that scope here in the language ID mapping.

@rchl
Copy link
Member Author

rchl commented Oct 3, 2025

I agree. Dropping this in favor of someone creating a dedicated helm syntax.

@rchl rchl closed this Oct 3, 2025
@rchl rchl deleted the Add-mapping-for-source.yaml.go-=>-helm branch October 3, 2025 13:15
@predragnikolic
Copy link
Member

source.yaml.go is the correct syntax for helm .
I just checked this on Sublime Text discord.

@rchl
Copy link
Member Author

rchl commented Oct 6, 2025

While it's true that the Yaml (Go) syntax is correct one to use, I think it would still be a good idea to create a dedicated Helm syntax for both LSP and discoverability sake. Even if it just includes the other syntax.

@jwortmann
Copy link
Member

To my understanding, Helm template files are just a subset of all possible files that could use the "YAML (Go)" syntax. That syntax has some other predefined filenames which probably should not start the Helm language server or use the helm language ID: https://github.com/sublimehq/Packages/blob/ec775d84c77d5649644b7adf4e9e5a51f973e0be/Go/YAML%20(Go).sublime-syntax#L10-L14

Example Helm syntax:

%YAML 1.2
---
name: YAML (Helm Template)
scope: source.yaml.pipeline.helm

contexts:
  main:
    - include: scope:source.yaml.go
      apply_prototype: true

And then add another line like https://github.com/SublimeText/YamlPipelines/blob/73d42b95e9924b11382687ea8e437ce28bd34a25/set_syntax_on_load_or_save.py#L10 adjusted with the Helm template path to that plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants