Group keybinds together and enable/disable them on the fly
This plugin allows you to easily build your own modes. It is heavily inspired by stackmap.nvim.
You could build a "debugging-mode" for example so you don't clutter your keymap with keybinds you don't use when not debugging
require('mode').add('n', 'Debugging', {
['<leader>b'] = require'dap'.toggle_breakpoint,
['<leader>c'] = require'dap'.continue,
['<leader>so'] = require'dap'.step_over,
['<leader>si'] = require'dap'.step_into,
['<leader>ro'] = require'dap'.repl.open,
})
which could be dynamically activated and deactivated by using the on
and off
functions:
-- activate
require('mode').on('Debugging')
-- deactivate when finished with debugging
require('mode').off('Debugging')
This plugin is:
- 🐒 easy to use
- 🪨 small and stupid
- 🚀 BLAZINGLY FAST (I think)
I am very new to plugin development so there is a good chance that this plugin contains some nasty bugs.
Here are some alternatives: