A VS Code extension that enables intelligent Ctrl+Click navigation for Argo WorkflowTemplate references in YAML files. Navigate seamlessly between template definitions and their usages across your entire workspace.
- π― Smart Context-Aware Navigation: Single Ctrl+Click does different actions based on where you click
- π Go to Definition: Navigate from template references to their definitions
- π Find All References: Show all usages of templates and WorkflowTemplates
- β‘ High Performance: Parallel processing, intelligent caching, and smart filtering
- π¨ Intelligent Disambiguation: Handles multiple templates with same names correctly
- π Cross-Resource Support: Works with Workflows, WorkflowTemplates, CronWorkflows, etc.
The extension uses context-aware navigation - a single Ctrl+Click performs different actions based on what you're clicking on:
When: Ctrl+Click on template references in usage files Action: Navigate to template definition
# In workflow.yaml - Ctrl+Click on "step1":
templateRef:
name: tem-tem1
template: step1 # β Ctrl+Click here goes to definition in tem1.yaml
When: Ctrl+Click on template names in WorkflowTemplate definition files Action: Show all references to this template
# In tem1.yaml - Ctrl+Click on "step1":
spec:
templates:
- name: step1 # β Ctrl+Click here shows all references
container:
image: alpine
When: Ctrl+Click on WorkflowTemplate names in metadata section Action: Show all references to this WorkflowTemplate
# In tem1.yaml - Ctrl+Click on "tem-tem1":
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: tem-tem1 # β Ctrl+Click here shows all WorkflowTemplate references
spec:
templates:
- name: step1
test-files/
βββ tem1.yaml # WorkflowTemplate with step1, step2
βββ workflow.yaml # Workflow referencing tem1
βββ multiple-templates.yaml # Multiple WorkflowTemplates with overlapping names
βββ composite-template.yaml # WorkflowTemplate using other templates
βββ cronworkflow.yaml # CronWorkflow referencing templates
βββ ...
- Open
workflow.yaml
- Ctrl+Click on
step1
intemplate: step1
- Expected: Navigate to
tem1.yaml
line 7 (- name: step1
)
- Open
tem1.yaml
- Ctrl+Click on
step1
in- name: step1
- Expected: Shows references in:
workflow.yaml
cronworkflow.yaml
composite-template.yaml
- Open
tem1.yaml
- Ctrl+Click on
tem-tem1
inname: tem-tem1
- Expected: Shows all WorkflowTemplate references across workspace
- Open
complex-workflow.yaml
- Multiple WorkflowTemplates have
step1
templates - Ctrl+Click correctly uses
templateRef.name
to find the right template
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch for changes during development
npm run watch
- Launch Extension Development Host: Press
F5
in VS Code - Open Test Files: Open the
test-files
folder in the new VS Code window - Test Navigation: Try Ctrl+Click on different template names and references
- Check Console: Open Developer Tools (Help β Toggle Developer Tools) for debug logs
src/
βββ extension.ts # Extension entry point
βββ providers/
β βββ argoTemplateDefinitionProvider.ts # Main navigation logic
β βββ argoTemplateReferenceProvider.ts # Reference provider (backup)
βββ services/
β βββ templateSearchService.ts # Search logic
β βββ fileSystemService.ts # File operations
β βββ workspaceCacheService.ts # Caching
βββ types/
βββ index.ts # Type definitions
The extension automatically detects:
- Template References:
templateRef.template
usage - Template Definitions:
- name:
in templates section - WorkflowTemplate Names:
metadata.name
in WorkflowTemplate files - WorkflowTemplate References:
templateRef.name
andworkflowTemplateRef.name
- Parallel Processing: Multiple files processed concurrently
- Intelligent Caching: File contents cached with auto-invalidation (30s timeout)
- Smart Filtering: Automatically skips irrelevant directories (node_modules, .git, etc.)
- Cancellation Support: Long operations can be cancelled for responsive UI
When multiple WorkflowTemplates contain templates with the same name:
- Extension identifies the
templateRef.name
(WorkflowTemplate name) - Searches specifically within that WorkflowTemplate
- Locates the correct template definition
- Navigates to the exact line
- VS Code 1.80.0 or higher
- YAML language support (usually built-in)
- Files must be in a workspace folder
Extension not working?
- Check that extension is activated (look for "Uranus YAML extension activated" message)
- Ensure you're in a
.yaml
file (check bottom right corner shows "YAML") - Try clicking directly on the template name, not surrounding whitespace
No results found?
- Verify YAML structure is correct (proper indentation)
- Check that WorkflowTemplate and template names match exactly
- Look for typos in template names
Performance issues?
- Large workspaces may take longer to search
- Check VS Code Developer Console for error messages
- Try reloading the window (Ctrl+R)
- Open VS Code Developer Console: Help β Toggle Developer Tools β Console tab
- Look for
ArgoTemplateDefinitionProvider
andTemplateSearchService
logs - Messages show what the extension is detecting and searching for
- β Context-aware Ctrl+Click navigation
- β Go to Definition for template references
- β Find All References for template definitions
- β Find All References for WorkflowTemplate names
- β Smart disambiguation for same-named templates
- β High-performance parallel search with caching
- β Support for Workflows, WorkflowTemplates, CronWorkflows
This extension provides a foundation for Argo Workflow development productivity. The codebase is structured for easy extension and maintenance.
- New Resource Types: Add support for other Argo resources
- Enhanced Search: Improve search algorithms and filtering
- UI Improvements: Add status indicators, progress bars, etc.
- Additional Features: Hover information, auto-completion, etc.
Enjoy seamless Argo Workflow development! π templates: - name: step1
## π Usage
1. **Open** any YAML file containing Argo Workflow definitions
2. **Ctrl+Click** on any template or WorkflowTemplate name
3. **Let the extension decide** what action to take based on context:
- From references β Navigate to definition
- From definitions β Show all references
### Example Scenarios
**Navigate to WorkflowTemplate Definition**:
```yaml
apiVersion: argoproj.io/v1alpha1
kind: Workflow
spec:
workflowTemplateRef:
name: my-template # Ctrl+Click β Go to WorkflowTemplate
Navigate to Specific Template:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
spec:
templates:
- name: main
steps:
- - name: call-step
templateRef:
name: tem-tem1
template: step1 # Ctrl+Click β Go to template definition
Find All References:
# In WorkflowTemplate file
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: tem-tem1 # Ctrl+Click β Show all WorkflowTemplate references
spec:
templates:
- name: step1 # Ctrl+Click β Show all template references
container:
image: alpine
- Launch Extension: Press
F5
in VS Code - Open Test Files: Navigate to
test-files
folder in the new window - Try Navigation:
- Open
workflow.yaml
β Ctrl+Click onstep1
β Should navigate totem1.yaml
- Open
tem1.yaml
β Ctrl+Click onstep1
β Should show references panel - Open
tem1.yaml
β Ctrl+Click ontem-tem1
β Should show WorkflowTemplate references
- Open
tem1.yaml
- Simple WorkflowTemplate with templatesworkflow.yaml
- Basic workflow using templatescronworkflow.yaml
- Scheduled workflowmultiple-templates.yaml
- Multiple WorkflowTemplates with overlapping namescomposite-template.yaml
- WorkflowTemplate using other templates- Additional test files for comprehensive coverage
- Parallel Processing: Multiple files processed concurrently
- Intelligent Caching: File contents cached with auto-invalidation
- Smart Filtering: Automatically skips irrelevant directories (node_modules, .git, etc.)
- Cancellation Support: Long operations can be cancelled for responsive UI
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch for changes
npm run watch
# Test extension
# Press F5 in VS Code to launch Extension Development Host
- VS Code 1.80.0 or higher
- YAML files with proper Argo Workflow structure
- Workspace with YAML files containing WorkflowTemplate definitions
- Context Detection: The extension automatically detects whether you're clicking on a reference or definition
- Disambiguation: When multiple WorkflowTemplates have templates with the same name, the extension uses
templateRef.name
to find the correct one - Cross-File Search: Searches across all YAML files in your workspace
- Error Handling: Shows informative messages when templates or references aren't found
- ArgoTemplateDefinitionProvider: Main provider handling Ctrl+Click navigation
- TemplateSearchService: Core search logic with caching and parallel processing
- FileSystemService: File operations and YAML file discovery
- Smart Context Detection: Determines appropriate action based on cursor position