vscode-wakatime
vscode-wakatime copied to clipboard
Leverage User Settings
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.
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.
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.
Any more thoughts on this one, @alanhamlett ?
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 - Awesome! It seems like I'm asking a lot of you lately. :)
What's the status of this issue @alanhamlett?
@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.
is that a feature already inmplemented/needed @alanhamlett?
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?
If we pass
--keyto wakatime-cli does it complain about missing~/.wakatime.cfgor does it work without the config file?
It won't complain about missing config file unless you provide key flag.