aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim/lua/plugins/hardtime.lua
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2023-10-25 13:53:04 +0200
committersrdusr <trevorgray@srdusr.com>2023-10-25 13:53:04 +0200
commit2c49131ff00a8382db174f98e9b28a4aa1144e45 (patch)
tree51272c61898f947a03b07567b4ccd165457f2f37 /.config/nvim/lua/plugins/hardtime.lua
parenta29840b387d2c0f8601eb05320d909877788564e (diff)
parent0e107e029372f333f64854913fa2f67bb7c4a243 (diff)
downloaddotfiles-2c49131ff00a8382db174f98e9b28a4aa1144e45.tar.gz
dotfiles-2c49131ff00a8382db174f98e9b28a4aa1144e45.zip
Merge commit 'bd7ffa3f18dfc476e94bd97a2f4a2dd231656fc0'
Diffstat (limited to '.config/nvim/lua/plugins/hardtime.lua')
-rw-r--r--.config/nvim/lua/plugins/hardtime.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/.config/nvim/lua/plugins/hardtime.lua b/.config/nvim/lua/plugins/hardtime.lua
new file mode 100644
index 0000000..1fb58cc
--- /dev/null
+++ b/.config/nvim/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,
+}