From 23ac4c6f2bc3662a4770b7157374eb9327fc7eda Mon Sep 17 00:00:00 2001 From: srdusr Date: Tue, 24 Oct 2023 22:16:46 +0200 Subject: Add hardtime.lua --- lua/plugins/hardtime.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lua/plugins/hardtime.lua (limited to 'lua/plugins') 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, +} -- cgit v1.2.3