Tatsh / kate-wakatime

Kate plugin to interface with WakaTime
https://tatsh.github.io/kate-wakatime/
11 stars 9 forks source link

Kate uses incorrect parent directory for the "project name" #30

Open wizzardx opened 5 months ago

wizzardx commented 5 months ago

In my project, if I have a structure like this in it:

my_project/
├── .git
└── lib
    └── test.py

And in Kate (with the plugin installed), I spend time editing my_project/lib/test.py

Then this gets registered as having spent time in the "lib" project over in my Wakatime dashboard.

I think (also to be consistent with other IDEs with Wakatime integration) that the project name on the Wakatime dashboard shoud be "my_project", ie the first directory name under the edited file that contains a .git subdirectory.

alanhamlett commented 5 months ago

It's because this plugin sends heartbeats directly to the API without using wakatime-cli. We should instead send the current file to wakatime-cli to fix this bug.