You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like KCL to support editing strings embedded in yaml block strings as is common with kcl functions.
Is your feature request related to a problem? Please describe:
The problem is that I don't benefit from the kcl extension when writing embedded kcl scripts. To work around this, I copy and paste that script into a temp file, edit it there, then paste it back.
The alternative I'm using is copy-pasting the kcl script into another file, editing until I'm happy with it, then pasting it back.
I've also looked into (but not implementing) using oci containers to host my script -- but for scripts that are never reused and reasonable to embed, that results in a fairly large edit - test loop, and requires I have a solution for registry hosting, which i didn't need before. It also exposes a bunch of implementation details in a public registry that might create maintenance issues.
I've also looked into writing my kcl script containing yaml with kcl -- but the files I'm editing are crossplane compositions, which benefit from the upbound vscode extension for a variety of consistency checks.
This looks like an interesting feature request. The approach I am thinking is to extend the existing TextMate grammar to support embedded KCL scripts within YAML block strings. For instance, adding support for comments like | # kcl to trigger the highlighting. I'll work on ensuring that KCL-specific language features like code completion, diagnostics, and snippets work within these blocks.
I’ll start exploring the codebase and post updates as I progress. If you have any guidance, tips, or specific edge cases I should consider, please let me know!
CC : @He1pa@Peefy
Feature Request
I would like KCL to support editing strings embedded in yaml block strings as is common with kcl functions.
Is your feature request related to a problem? Please describe:
The problem is that I don't benefit from the kcl extension when writing embedded kcl scripts. To work around this, I copy and paste that script into a temp file, edit it there, then paste it back.
Describe the feature you'd like:
I would like KCL to support code completion and syntax highlighting within yaml block strings that represent yaml code. There are extensions that do similar things such as https://marketplace.visualstudio.com/items?itemName=ruschaaf.extended-embedded-languages and https://marketplace.visualstudio.com/items?itemName=harrydowning.yaml-embedded-languages
Describe alternatives you've considered:
The alternative I'm using is copy-pasting the kcl script into another file, editing until I'm happy with it, then pasting it back.
I've also looked into (but not implementing) using oci containers to host my script -- but for scripts that are never reused and reasonable to embed, that results in a fairly large edit - test loop, and requires I have a solution for registry hosting, which i didn't need before. It also exposes a bunch of implementation details in a public registry that might create maintenance issues.
I've also looked into writing my kcl script containing yaml with kcl -- but the files I'm editing are crossplane compositions, which benefit from the upbound vscode extension for a variety of consistency checks.
Teachability, Documentation, Adoption, Migration Strategy:
I don't think a migration strategy would be required -- and users of the kcl lang vscode plugin would benefit in a wider range of scenarios.
The text was updated successfully, but these errors were encountered: