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

Leverage User Settings

Open mpearon opened this issue 7 years ago • 10 comments

OS: Windows 10 1706 / Ubuntu 16.04 vsCode Version: 1.20.1 Plugin Version: 1.1.22

Issue

I think that this plugin should leverage User Settings to store configuration options such as the APIKey and Status Bar Icon. This would be convenient, and allow for easier syncing.

mpearon avatar Feb 16 '18 02:02 mpearon

The reason we use ~/.wakatime.cfg is because many people have multiple editors and this way all the editors share the same config file. If there's a way to keep the user settings in sync with a local file, then we could use both.

alanhamlett avatar Feb 16 '18 07:02 alanhamlett

Ah, that makes sense. not sure how efficient this would be, because it would increase the initialization time, but initialization could look to settings first, then to the cfg.

  • If the CFG doesn’t exist, and the Setiings don’t exist, create both.
  • If the CFG doesn’t exist, and the Settings do, create the CFG based on the Settings.
  • If the CFG exists and the Settings don’t, create the settings based on the CFG.
  • If both exist, but differ, prompt the user in the UI, updating both.

mpearon avatar Feb 16 '18 13:02 mpearon

Any more thoughts on this one, @alanhamlett ?

mpearon avatar Mar 13 '18 23:03 mpearon

That's doable, we could even only prompt for specific setting keys that are found in both ~/.wakatime.cfg and VS Code Settings, and only when those setting's have different values.

alanhamlett avatar Mar 19 '18 00:03 alanhamlett

@alanhamlett - Awesome! It seems like I'm asking a lot of you lately. :)

mpearon avatar Mar 19 '18 18:03 mpearon

What's the status of this issue @alanhamlett?

gandarez avatar Apr 15 '19 14:04 gandarez

@alanhamlett Currently we have shared remote workspaces (for Remote SSH to connect), thus it is necessary for us to have WakaTime reading the settings using the VSCode settings mechanism. Also we need to have the option to disable .wakatime.cfg so that it won't prompt when missing.

vilicvane avatar Oct 02 '19 06:10 vilicvane

is that a feature already inmplemented/needed @alanhamlett?

gandarez avatar May 17 '22 11:05 gandarez

is that a feature already inmplemented/needed @alanhamlett?

If we pass --key to wakatime-cli does it complain about missing ~/.wakatime.cfg or does it work without the config file?

alanhamlett avatar May 18 '22 01:05 alanhamlett

If we pass --key to wakatime-cli does it complain about missing ~/.wakatime.cfg or does it work without the config file?

It won't complain about missing config file unless you provide key flag.

gandarez avatar May 20 '22 14:05 gandarez