Closed SteamedFish closed 2 years ago
works for me.. have you tried upgrading wakatime cli?
also related to #37
works for me.. have you tried upgrading wakatime cli?
My wakatime cli is the most recent version 13.0.7, wakatime-mode is the most recent git commit 762667831
vim-wakatime is able to report my language correctly, which confuses me, because from #37, the language detection is done at server side, instead of client side.
This is my system information, I'm using Doom Emacs
((system
(type . gnu/linux)
(config . "x86_64-pc-linux-gnu")
(shell . "/bin/zsh")
(uname . "Linux 5.8.12-arch1-1 #1 SMP PREEMPT Sat, 26 Sep 2020 21:42:58 +0000 x86_64")
(path "~/.zinit/polaris/sbin" "~/.zinit/polaris/bin" "~/.emacs.d/bin" "/opt/jython/bin/" "/opt/google-cloud-sdk/bin" "/usr/condabin" "/usr/local/sbin" "/usr/local/bin" "/usr/bin" "/opt/android-sdk/platform-tools" "/opt/android-sdk/tools" "/opt/android-sdk/tools/bin" "/usr/lib/jvm/default/bin" "/usr/bin/site_perl" "/usr/bin/vendor_perl" "/usr/bin/core_perl" "~/.go/bin" "~/.cargo/bin" "~/.local/bin" "~/bin" "/opt/context-minimals/texmf-linux-64/bin" "/usr/lib/emacs/28.0.50/x86_64-pc-linux-gnu"))
(emacs
(dir . "~/.emacs.d/")
(version . "28.0.50")
(build . "Sep 30, 2020")
(buildopts . "--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games --with-sound=alsa --with-modules --without-gconf --without-gsettings --with-nativecomp --with-x-toolkit=gtk3 --without-xaw3d --without-m17n-flt --with-cairo --without-compress-install 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -g -fuse-ld=gold' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now")
(features . "XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GLIB NOTIFY INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES NATIVE_COMP THREADS LIBSYSTEMD JSON PDUMPER LCMS2")
(traits batch server-running envvar-file))
(doom
(dir . "~/.doom.d/")
(version . "2.0.9")
(build . "HEAD -> develop, origin/develop, origin/HEAD 1456108d5 2020-09-10 18:03:32 -0400")
(elc-files . 0)
(modules :input chinese :completion (company +childframe) (ivy +childframe +icons +fuzzy) :ui deft doom doom-dashboard doom-quit fill-column hl-todo hydra indent-guides (ligatures +extra) minimap modeline nav-flash ophints (popup +all) treemacs vc-gutter vi-tilde-fringe (window-select +switch-window +numbers) workspaces zen :editor (evil +everywhere) file-templates fold (format +onsave) multiple-cursors rotate-text snippets word-wrap :emacs (dired +ranger +icons) electric (ibuffer +icons) undo vc :term eshell shell nil vterm :checkers (syntax +childframe) (spell +everywhere) grammar :tools ansible (debugger +lsp) direnv docker editorconfig eval gist (lookup +docsets +dictionary) lsp (magit +forge) make (pass +auth) pdf prodigy rgb taskrunner terraform tmux upload :os tty :lang (cc +lsp) data emacs-lisp (go +lsp) json javascript latex ledger markdown (org +brain +dragndrop +gnuplot +hugo +journal +jupyter +noter +pandoc +pomodoro +present +pretty +roam) plantuml (python +lsp +conda +poetry +cython) raku rest (rust +lsp) sh web yaml :email (mu4e +gmail) :app calendar irc (rss +org) twitter :config (default +bindings +smartparens) :steamedfish (&user ansible) (&user puppet) (&user basic) (&user chinese) (&user coding) (&user irc) (&user keybindings) (&user orgmode) (&user email) (&user nov-mode) (&user speed-type) (&user telega) (&user ui) (&user tools) (&user beancount))
(packages "n/a")
(unpin t)
(elpa "n/a")))
I compared the differences between wakatime-mode and vim-wakatime.
wakatime-mode will call wakatime-cli like this
/usr/bin/python /usr/bin/wakatime --file /home/steamedfish/work/xxxxx/src/main.rs --plugin emacs-wakatime/1.0.2 --time 1601447593.11 --write
and vim-wakatime calls like this
/usr/bin/python3 -W ignore /home/steamedfish/.cache/vimfiles/repos/github.com/wakatime/vim-wakatime/packages/wakatime/cli.py --entity /home/steamedfish/work/xxxxx/src/main.rs --time 1601447699 --plugin vim/800 vim-wakatime/8.0.0 --language rust
which means vim-wakatime does language detection at client side, which clarified my confusion.
Fixed in the latest version of wakatime-cli.
When editing golang or rust, wakatime dashboard correctly reports filenames I edited (which are .rs or .go files) and the time I spend on those files. But the Languages are Other instead of golang/rust.