GideonWolfe / vim.reaper

💀 A Hackable, Fully Featured, Rice Friendly Neovim Configuration
286 stars 10 forks source link

Consider using vimspector for vscode like debugging #13

Open dsych opened 3 years ago

dsych commented 3 years ago

There is this REALLY cool project that uses DAP from vscode to allow the same debugging experience by re-using the extension ecosystem.

Check it out here: https://github.com/puremourning/vimspector

Seems like this would go a long way complimenting coc-nvim in emulating IDE features.

GideonWolfe commented 3 years ago

Thanks for the suggestion! I've heard of this but to be honest haven't had a real reason to use it, though I surely will eventually. I'll take a look myself but I will probably add it since there's nothing else that covers this use case at all.

dsych commented 3 years ago

Wow this was fast! Great to hear that you will consider it. I use it daily to work on c++ code and so far it has been a blast.

GideonWolfe commented 3 years ago

Cool! Is there any specific configurations/keybinds that you find to be helpful in your workflow? Maybe <leader>+somekey to open the debug window?

dsych commented 3 years ago

vimspector comes with a set of predefined keybindings to manage debug sessions, see this. so we just need to set let g:vimspector_enable_mappings. i have also seen people define keymaps for quick navigation between vimspector windows e.g. nmap <leader>dw :call win_gotoid("g:vimspector_session_windows.watches") this will jump the current window to the Watches right away instead of using window navigation; see this link for reference.

dsych commented 3 years ago

oh, and using the same window ids you can shift the layout as well, say you dont want the terminal window or you would like to adjust the size of the variables window to be bigger, see this for an example

N3r0m5ns3r commented 3 years ago

https://github.com/GideonWolfe/vim.reaper/pull/17#issue-691863672 feel free to check my PR and add more bindings