dotenv-vscode icon indicating copy to clipboard operation
dotenv-vscode copied to clipboard

Add support for custom file associations

Open Dhravya opened this issue 8 months ago • 0 comments

Related to #103

Introduces custom file associations for dotenv files through settings.json, enhancing flexibility and user configuration options.

  • Package.json Updates:

    • Adds a new configuration setting dotenv.files.associations to allow users to define custom file associations for dotenv files.
    • Updates activationEvents to include onLanguage:dotenv, ensuring the extension activates for custom file associations.
  • Code Logic Enhancement:

    • Modifies lib/fileAssociations.js to read custom file associations from settings.json and merges them with default associations. This allows for dynamic association of files with the dotenv language based on user preferences.
  • Documentation:

    • Updates README.md to include instructions on how to define custom file associations for dotenv files in settings.json, providing clear guidance for users to leverage this new feature.

I needed this feature for allowing files like .dev.vars to be cloaked during stream. Used copilot workspace to make a PR

For more details, open the Copilot Workspace session.

Dhravya avatar Jun 02 '24 18:06 Dhravya