aboutsummaryrefslogtreecommitdiff
path: root/lua/plugins
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2023-10-24 22:16:46 +0200
committersrdusr <trevorgray@srdusr.com>2023-10-24 22:16:46 +0200
commit23ac4c6f2bc3662a4770b7157374eb9327fc7eda (patch)
treeebae7e5e1dcc3580d1f004b8e380f2b7af509b9b /lua/plugins
parentc287afaf5e62445efa39a052e9241c05700714e9 (diff)
downloaddotfiles-23ac4c6f2bc3662a4770b7157374eb9327fc7eda.tar.gz
dotfiles-23ac4c6f2bc3662a4770b7157374eb9327fc7eda.zip
Add hardtime.lua
Diffstat (limited to 'lua/plugins')
-rw-r--r--lua/plugins/hardtime.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/lua/plugins/hardtime.lua b/lua/plugins/hardtime.lua
new file mode 100644
index 0000000..1fb58cc
--- /dev/null
+++ b/lua/plugins/hardtime.lua
@@ -0,0 +1,19 @@
+local hardtime = require('hardtime')
+
+-- Function to toggle the hardtime state and echo a message
+local hardtime_enabled = true
+
+function ToggleHardtime()
+ hardtime.toggle()
+ hardtime_enabled = not hardtime_enabled
+ local message = hardtime_enabled and 'hardtime on' or 'hardtime off'
+ vim.cmd('echo "' .. message .. '"')
+end
+
+hardtime.setup({
+ -- hardtime config here
+})
+
+return {
+ ToggleHardtime = ToggleHardtime,
+}