Closed schilkp closed 12 months ago
How about just make the enabled
variable exposed?
change this:
local enabled = false
to this:
M.enabled = false
If that works - sure. I don't know lua very well. Is theM
table effectively a singleton or would multiple require('hardtime')
s have individual M
tables? I presumed it was a local for that reason :)
Edit: Just realized M
is a local as well - so that logic is flawed. They would behave the same.
Thank for the PR!
Btw, I just rename it from M.enabled
to M.is_enabled
. I found that this is more clear.
Thanks!
Hi!
Adds a
M.is_enabled()
function to expose the current state of hardtime. Useful for statuslines and many different things :)Apologies if this is already possible - I had a very quick look and did not see it.
Thanks!