usage-tracker.nvim icon indicating copy to clipboard operation
usage-tracker.nvim copied to clipboard

Branch and html feature, bugfixes and improvements

Open Dronakurl opened this issue 1 year ago • 2 comments

Use stylua format, replace vim script, data folder

  • stylua formatter changed a bit of code. The config is included
  • Some autocommand groups where defined in vim script. Converted to lua, for better debugging
  • Fixed all diagnostic messages with lua language server
  • moved the json file from .config to .local folder. Some people want .config to just be their settings (e.g. to include in their dotfiles). A log file should be placed elsewhere. I will make it configurable later
  • added a configuration with optional variables Configuration was previously handled with global variables. It is better to define a configuration that is optional
  • Add configuration option for json file path
  • Added the branch tracking - No aggregation yet https://github.com/gaborvecsei/usage-tracker.nvim/issues/7
  • fixed wrong port in the telemetry endpoint
  • Better error handling telemetry, select aggregation The error handling for plenary.curl did not work, because it is an async call. plenary.curl documentation is not easy, but I found this https://github.com/nvim-lua/plenary.nvim/pull/471 and included on_error to handle possible errors
  • When the user forgets the aggregation key, a selection is called. As it is vim.ui.select, it should be with the picker of choice
  • plenary test for config
  • html file generation using chart.js
  • doc file

Dronakurl avatar Feb 21 '24 22:02 Dronakurl

@Dronakurl thank you very much for the PR! I'll try to review it in the following week - but this is a huge one so it'll take a bit of time. If you can see any features that could be in a separate PR, then it would help if you could separate them.

gaborvecsei avatar Mar 01 '24 13:03 gaborvecsei

OK, I will see to it. I am on some other project right now, though. The html file generation could be separated, I think.

  • I just disabled the plugin in my own environment, because I see these problems you also described in the README. Sometimes, there are periods which are longer than 24h. I think it has something to do with the inactivity detector which does not trigger when I just close my laptop lid or something.
  • I had a look at wakatime.nvim, they use similar techniques, but I could not find out, how they solved this issue (mainly because it is written in vim script). It might even be possible to integrate the possibility to send "heartbeats" to wakatime as an option.

Dronakurl avatar Mar 17 '24 10:03 Dronakurl