diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-10-25 13:53:04 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-10-25 13:53:04 +0200 |
| commit | 2c49131ff00a8382db174f98e9b28a4aa1144e45 (patch) | |
| tree | 51272c61898f947a03b07567b4ccd165457f2f37 /.config/nvim/lua/plugins/hardtime.lua | |
| parent | a29840b387d2c0f8601eb05320d909877788564e (diff) | |
| parent | 0e107e029372f333f64854913fa2f67bb7c4a243 (diff) | |
| download | dotfiles-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.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, +} |
