diff options
Diffstat (limited to '.config/nvim/lua/plugins/hardtime.lua')
| -rw-r--r-- | .config/nvim/lua/plugins/hardtime.lua | 20 |
1 files changed, 20 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..153411d --- /dev/null +++ b/.config/nvim/lua/plugins/hardtime.lua @@ -0,0 +1,20 @@ +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 + disabled_filetypes = { 'qf', 'netrw', 'NvimTree', 'lazy', 'mason', 'oil', 'dashboard' }, +}) + +return { + ToggleHardtime = ToggleHardtime, +} |
