Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leverage User Settings #44

Open
mpearon opened this issue Feb 16, 2018 · 10 comments
Open

Leverage User Settings #44

mpearon opened this issue Feb 16, 2018 · 10 comments

Comments

@mpearon
Copy link

mpearon commented Feb 16, 2018

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.

@alanhamlett
Copy link
Member

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.

@mpearon
Copy link
Author

mpearon commented Feb 16, 2018

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
Copy link
Author

mpearon commented Mar 13, 2018

Any more thoughts on this one, @alanhamlett ?

@alanhamlett
Copy link
Member

alanhamlett commented Mar 19, 2018

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.

@mpearon
Copy link
Author

mpearon commented Mar 19, 2018

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

@gandarez
Copy link
Member

What's the status of this issue @alanhamlett?

@vilicvane
Copy link

@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.

@gandarez
Copy link
Member

is that a feature already inmplemented/needed @alanhamlett?

@alanhamlett
Copy link
Member

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?

@gandarez
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants