diff options
Diffstat (limited to '.config/nvim/lua/plugins/hardtime.lua')
| -rw-r--r-- | .config/nvim/lua/plugins/hardtime.lua | 19 |
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, +} |
