dbgx / lldb.nvim

No longer maintained. Possible alternative: https://github.com/rcarriga/nvim-dap-ui
Other
262 stars 20 forks source link

Way of detecting through vimscript what mode nvim is in #45

Closed jonathansty closed 7 years ago

jonathansty commented 7 years ago

Is there currently a way to detect what mode (debug or code) nvim is in?

I would like to have different keybindings depending on the mode.

critiqjo commented 7 years ago

There is a callback that can be customized when switching mode. Change the environment variable g:lldb#session#mode_setup to the name of the function you want to invoke. By default, it is 'lldb#layout#setup'. The function you have must take one argument which will be the name of the mode, and finally do call lldb#layout#setup(a:mode) to set up the default layout.