-
Notifications
You must be signed in to change notification settings - Fork 2
Organizing around the project rather than the markdown file #25
Comments
We already perform many Evidence project detection checks and commands enablement. This was added in (#18) Current limitationMostly due to Sprint 1 only one week of dev constraint to get basic interactive commands working first:
We'd need to extend those checks to detect nested Evidence projects for dbt, etc. |
Enabling and activating vscode extensions on startup is taxing and frowned upon in vscode dev community. Evidence extension and commands get activated on these main language events in VS Code currently:
Opening any of those files in VS Code will activate Evidence extension and reveal available commands. Also, many extensions contribute to the VS Code status bar. So, us taking space there without any emd documents to preview or update is hard to justify. |
I like this suggestion and will use it when I add the rest as described in #9 for the markdown detection. |
|
I actually tried to get https://code.visualstudio.com/api/references/activation-events#workspaceContains |
Most of the listed loose ends in this ticket were already resolved. See other referenced tickets. The rest will be handled in #64 and other markdown related tickets. |
I might have the wrong mental model about vs code extensions, but after playing with this, I wonder if this might be a reasonable way forward on a couple items.
I think we should have the extension detect whether or not there is an Evidence project in the current VS code workspace, and use that information to determine which status bar items, or command palette items are available.
If it's possible to use that same approach to decide how to treat .md files, I also think that would be a sensible way to go.
Detecting an Evidence project
Treatment of status bar items / commands
When an evidence project is detected in the workspace, we should offer all of the commands and status bar items, regardless of what files are open in vscode.
Eventually we might have some commands which are file specific, but right now all of them are project-level.
Treatment of markdown files
It seems like we're facing some weird trade-offs to have the extension whether or not we can safely override the built in markdown features
The options so far are:
If it's possible to use logic beyond just the file extension to determine how to treat the file, I think we could use the above approach to make a simpler judgements about how to treat the .md files that the extension encounters:
For example, the readme.md in the root of an evidence project should not be treated like evidence markdown.
The text was updated successfully, but these errors were encountered: