Feature request: expose function to get logged XP string for status line
Closed this issue · 2 comments
gabeklavans commented
I'd like access to the current logged XP in a formatted string to display on the status line, something like C::S 4
after writing 4 XP worth.
I believe this is common for the other IDE plugins. I'm not sure of the exact behavior, but I think the XP count remains until the "flow state" timer expires, then it resets to C::S 0
.
YannickFricke commented
Heya @gabeklavans :)
this is already possible with the get_xp_count
function. :)
Here is an example how you could do it:
local xp_string = "C::S " .. require("codestats-nvim").get_xp_count()
-- insert the xp_string variable into the status line here
gabeklavans commented
Awesome, thanks. I'm a bit rusty with lua and neovim tooling, so I couldn't figure it out!