-
Notifications
You must be signed in to change notification settings - Fork 20
A fork to support Vim-with-channels #34
Comments
I started this in a spur of the moment! I wasn't planning on this at first. I was actually trying to get GDB to work with Neovim. But debugging got a bit painful, so I thought to give Vim a try, and I gotta say -- Vim's channel/job API is much simpler and more flexible (at least imo). Debugging is a lot easier (due to flexibility). You can find it at https://github.com/johncf/gdb.vim It was just a day's work, and it's not yet in working condition. There are a few more bugs to clear to get it into a barely working condition. But the good news is that the code is lot simpler. There's only a single thread which takes care of interactions from both the front-end and the debugger. To try it now:
Nothing interesting can be seen in the editor either, but if you inspect the log file at Note: This will not work in Windows, because it does not support PS: This is an alias of @critiqjo |
Just in case someone wants to poke around, here are a few heads up:
|
Adding a try block around this line would probably fix the issue I pointed to in the above comment:
The change could be as follows: try:
Middleman(vimx).loop()
except:
import time, traceback
traceback.print_exc() # print traceback to stderr
time.sleep(2) # hope for vim to read cc @lenfien in case you're planning to hack on it. |
Basically, these 3 files have to be re-implemented:
autoload/lldb/remote.vim
: This is responsible for sending all events to the backend. This needs to be replaced with something which encodes these events in json and sends it to backend.rplugin/python/lldb_nvim/__init__.py
: This is the listener in the backend. This needs to be replaced with a listener which understands json fromremote.vim
.rplugin/python/lldb_nvim/vim_x.py
: This in the backend is what tells Neovim to take all sorts of actions. This needs to be replaced with:Note: There is only one RPC-like interaction from Neovim where it waits for a "response" for a "request" it sent and that is for auto-completion. Everything else is event-based, that is Neovim gets notified of stuff from backend. But RPC-like calls from the backend to Neovim are used extensively (wherever you see
async=False
and use of aQueue
invim_x.py
like this).PS: I'm not planning on implementing this. If anyone is interested, I would be happy to help.
The text was updated successfully, but these errors were encountered: