Open thany opened 3 years ago
Just a quick explanation, why currently the extension works like this:
Your suggestion makes sense, just I did not have the time to implement this alternative configuration storage.
Probably we should let the users choose if they would like to configure the documentation projects locally in the workspace or globally. Also some kind of migration should be provided for the other users.
I'm still not sure that the settings would be a good place for this, but probably we could use .vscode/documentations.json
or something similar... (You're right project may be misleading, but I thought it is fine if placed under the .mdoc
directory. documentation is ageneric name as well, Maybe we should name it as mdoc.json?)
mdoc.json
would probably be the best name. As for migration, I don't know if that's neccesary, as long as the extension can work with any of the current & proposed locations for config.
The configuration seems to be saved in
C:\Users\<username>\.mdoc
. Several problems with this:<user dir>\AppData\Roaming\<application>\
. That way it'll get synced for roaming profiles, and it sits in the right spot for various other purposes. Many software does this incorrectly, but that's no excuse of course.projects.json
be relative to the project where the configuration is stored in.So I imagine this projects configuration be stored in a
.vscode
directory, where project-specific VScode settings are supposed to go. Then, the project root dir is known, and directories can be made relative to the project root dir. So the projects.json, being stored in.vscode/mdoc/projects.json
could look something like this:I don't currently see a way to get mdoc to look there for the projects.json, let alone resolve relative paths.
(On a sidenote, my projects.json has 4 entries, 3 are identical and 1 is not correct. I'm only seeing one documentation root... Bug? Should this file automatically clean itself up or what?)
(On a secondary side, maybe not call this file projects.json - this is confusing because a project is a directory of source stuff that is opened in VScode. A project is not a collection of documentation. Rather call it documentation.json or something)