Crossplane GoTemplate Editor
VS Code extension for Crossplane YAML files that contain:
apiVersion: gotemplating.fn.crossplane.io/v1beta1
kind: GoTemplate
Features
- Semantic highlighting for Go template expressions inside
template: | and template: > blocks.
- Completion snippets for Go
text/template actions, pipelines, variables, and functions.
- TextMate token coloring injection for template blocks in YAML (works together with semantic highlighting).
- CodeLens action
Open Template Editor at template: lines to edit pure template action lines without {{ ... }} delimiters.
- Live editor sync back into the YAML block on save.
- Hover documentation for Go
text/template actions/functions and key Sprig helpers.
Extension Settings
This extension contributes the following settings:
crossplaneGoTemplate.enableCompletion - Enable completion items inside Crossplane GoTemplate YAML blocks.
crossplaneGoTemplate.enableSemanticHighlighting - Enable semantic highlighting for Go template expressions in Crossplane YAML blocks.
crossplaneGoTemplate.enableSourceCursorSync - Highlight and auto-scroll the source YAML line while moving the cursor in the GoTemplate editor.
crossplaneGoTemplate.enableLiveSync - Sync changes from the GoTemplate editor back to the source YAML while typing.
Development
npm install
npm run compile
Press F5 in VS Code to run the extension in an Extension Development Host.
References
| |