dendron icon indicating copy to clipboard operation
dendron copied to clipboard

Use VSCode's settings for configuration or store the config in AppData

Open github-account1111 opened this issue 3 years ago • 9 comments

Please select if your request is either something new or an enhancement

  • [x] Enhancement of an existing Feature.
  • [ ] Request of a new feature.

Please select the area your request applies to. (Multiple selections are Possible. You can leave blank if you're not sure.)

  • [x] Workspace - VSCode workspace, vaults, Intellisense/autocomplete, Dendron settings
  • [ ] Lookup - Dendron's Lookup Command
  • [ ] Views - Dendron Preview, Tree View, Side Panels in the UI
  • [ ] Schema - Dendron Schemas
  • [ ] Pod - Data import from / export to Dendron
  • [ ] Publish - External Site Publish
  • [ ] Markdown - Markdown features, such as syntax support and features

Is your feature request related to a problem? Please describe

Microsoft's guidelines are to store application settings in specific locations:

10.3 Your app data, which must be shared among users on the computer, should be stored within ProgramData 10.4 Your app s data that is exclusive to a specific user and that is not to be shared with other users of the computer, must be stored in Users\\AppData

Currently Dendron creates a directory and a separate file in %USERPROFILE% which is not the right place to store configuration. When programs do this, it complicates any backup process, makes migration or Windows reinstalls more cumbersome and error-prone. Not to mention a cluttered user directory really gets to my OCD!

Describe the solution you'd like

Either store configuration using VSCode's native settings (I'd say this is preferable) or in %APPDATA% , %LOCALAPPDATA% and/or PROGRAMDATA.

github-account1111 avatar May 14 '22 05:05 github-account1111

Thanks @github-account1111 for the suggestion.

Most of the contents currently in %USERPROFILE% are not essential in that you won't lose anything if you reinstall your OS and wipe that data out. There are a few configs that we are currently putting there that would, for example if you have custom styles for your graph view. We'll think of a way to better location for things like that.

Understand your concern about filesystem clutter, apologies for that.

jonathanyeung avatar May 16 '22 04:05 jonathanyeung

I would like to add that Dendron maybe should consider doing the same for MacOSx and Linux, as well as maybe following the XDG_{CONFIG|DATA|CACHE}_HOME Env Vars.

ghost avatar May 16 '22 08:05 ghost

@jonathanyeung I don't think that's quite accurate. Deleting the aforementioned file and folder seems to wipe everything and causes the "welcome to Dendron" message every time I open VSCode (even just an empty window) followed by the survey and tutorial, followed by the file and folder getting regenerated.

Most of the contents currently in %USERPROFILE% are not essential

Where is the rest of the config stored?

github-account1111 avatar May 16 '22 08:05 github-account1111

@github-account1111 - you're right on those points. I meant that deleting it won't cause you to lose personal data, but you're right in that it may adversely affect the user experience in the ways you mentioned.

Most of our config is stored in dendron.yml, which is a file located in the git workspace directory.

jonathanyeung avatar May 16 '22 11:05 jonathanyeung

My point is that there's no way to delete them without them reappearing upon the next launch. I also consider any sort of config essential data, as it's a hassle to reconfigure things without forgetting anything.

Is there a reason VSCode's native settings can't be used? IMO that would be so much more elegant.

github-account1111 avatar May 16 '22 14:05 github-account1111

There are some settings in dendron.yml that we want to co-located with the vaults and workspace files, because they apply specifically to those things. Furthermore, they can then be part of the same code repository as the notes, so they can also be managed under the same source-controlled repo as the notes.

We actually used to have settings mixed between VSCode's settings and dendron.yml, but this created confusion to users as to when to go where for which settings. Ultimately, we decided to consolidate to dendron.yml. I hear you in that we lose out on some benefits by not using VSCode's settings (for example, VS Code's roaming settings), better integration with VS Code, familiar paradigms, etc.

jonathanyeung avatar May 17 '22 09:05 jonathanyeung

But we gain the benefit of being able to integrate dendron with other editors when the settings are editor agnostic.

ghost avatar May 17 '22 11:05 ghost

I hope this gets looked into, a .dendron folder and two files .dendron.telemetry and .dendroid.uuid is not acceptable. it's too much for a single extension, these should be at least a way to opt out of using them.

hossamdash avatar Jun 26 '23 13:06 hossamdash

I completely agree, this pollutes my home folder which I try and keep reasonably clean. Not having a way to set these via environement variables or to support XDG specifications is quite poor. I'd really love to see any update to this!

mayurankv avatar Jun 07 '24 00:06 mayurankv