Feature Request: Support Multiple Workspaces with Dynamic Resolution in File Header
Description: Hi there, I'm really enjoying using the psioniq File Header extension — it's a great tool for keeping file headers consistent and informative.
I'd like to propose a new feature to support multiple workspaces or project names, where the <
Use Case In my daily development workflow, I work with multiple projects and workspaces. Currently, the extension allows setting a single static value for workspace, but this doesn't scale well when working across different projects.
It would be extremely helpful if the extension could dynamically determine the workspace or project name based on the file path, using rules like regex or substring matching.
Proposed Configuration Format Here's a suggested JSON configuration format that could be used (under psi-header.config):
{
"psi-header.config": {
"workspaces": [
{
"rule": "regex",
"pattern": "/Users/[a-z]+/workspace1",
"workspace": "Workspace1"
},
{
"rule": "contains",
"pattern": "/Users/username/workspace2",
"workspace": "Workspace2"
}
]
}
}
With this setup:
- If a file is located under /Users/username/workspace1, the <
> placeholder would resolve to Workspace1. - If it's under /Users/username/workspace2, it would resolve to Workspace2. This logic could also be extended to other fields like projectname, allowing more flexible and context-aware file headers.
I think this would be a great addition for developers working across multiple projects and would make the file headers even more meaningful and context-aware.
Thanks for considering this feature!
I am planning on doing some work on the extension soon, so will go through this and determine what can be done.
Regards D
Thank you for the response! Just wanted to say that psi-header has been a huge time-saver for my workflow — really appreciate your work on this. Looking forward to the updates! 🙌
Best regards