This Visual Studio Code extension helps manage and navigate YAML modules and their associated default values easily within your workspace. You can quickly open module directories and default files, enhance your workflow with simple commands, and enjoy the convenience of auto-complete features.
Features
Navigate Modules: Open module directories directly from within your code.
Default Values: Open the corresponding default YAML files for your modules.
Auto-Complete: The extension provides auto-completion for module names, making it easier to navigate and work with modules.
Customizable Paths: Configure the path to your modules and default files directly from VSCode settings.
Installation
Open Visual Studio Code.
Go to the Extensions View (Ctrl+Shift+X).
Search for YAML Module Helper.
Click Install.
Configuration
You can configure the following settings for this extension:
Modules Path: Path to your modules directory.
Defaults Path: Path to the directory containing your default values YAML files.
Default File Extension: Set the default file extension for your default values files (e.g., .yaml, .json).
How to Set Paths Using GUI:
Press Ctrl + , (or Cmd + , on macOS) to open Settings.
Search for yamlModuleHelper in the search bar.
Configure the following options:
Modules Path: Enter the absolute path to your modules folder.
Defaults Path: Enter the absolute path to your default values folder.
Default File Extension: Enter the extension for your default values files (e.g., .yaml, .json).
How to Set Absolute Paths:
Open the Settings UI in VSCode (Ctrl + , or Cmd + ,).
In the search bar, type yamlModuleHelper.
Set your absolute paths for Modules Path, Defaults Path, and Default File Extension.
Example:
Modules Path: /home/user/projects/modules (or C:/Users/user/projects/modules on Windows)
Defaults Path: /home/user/projects/defaults (or C:/Users/user/projects/defaults on Windows)
Default File Extension: .yaml
Once set, these paths will be used by the extension to find and open modules and default values.
Commands
This extension registers the following command:
yamlModuleHelper.openModuleDirectory: Opens the directory for the specified module.
yamlModuleHelper.openDefaultFile: Opens the corresponding default YAML file for the specified module.
Auto-Complete
The extension provides an auto-complete feature when typing module names in the editor. It helps you quickly select a module name from a list of available modules in your workspace, reducing the chance of errors and speeding up the workflow.
Shortcuts
Ctrl + Click (or Cmd + Click on macOS) on a module name to open the corresponding module directory.
Right-click on a module name and choose Open Default File to open the default values YAML file for the selected module.
Troubleshooting
If the absolute paths are not taking effect immediately, try reloading the extension or restarting VSCode.