Hello
I am primarily a cpp/c programmer looking to move to python for some ML applications for my research.
I am trying to extend my nvim to work well for python. I have already setup pyright ls with efm (mypy, black) for lsp + lint + format. So that part works great
What I need help with is shell, repl/debugging. I will be grateful for any and all recommendations or suggestions
-
For C, Cpp etc I used vim-dispatch by tpope. I have tried setting up dispatch for python by configuring the buffer variable
b:dispatch = 'python %'
but that does not work well as the shell is not interactive.
For now I am just launching:terminal
(with custom vimscript to make it toggleable/hideable).
What do others here use for interactive shell for python from within vim? -
As for debugger, I used to use vim’s native termdebug packages for Cpp. I am aware of nvim-dap + necessary plugins but I kinda prefer the simple termdebug.
Is there a way to set it up for python? The debuggers I found from basic searches were pdb++ and pudb, both of which being python modules, I dont know how to configure them with termdebug
Doing something likelet g:termdebugger='python -m pudb'
does not work.
Writing a bash script that goespython -m pudb $@
and setting that script to termdebug variable does not work either.
Can anyone recommend any other program or how to setup termdebug for these options?