Daniel Hahler

Results 1440 comments of Daniel Hahler

Updated to include `python_execute`/`python_execute_file` and improved format_exc_msg.

Even with these improvements I think some additional `v:exception_info` might be useful, which could be a dict, which could then hold something like `python_traceback`, containing the lines of the traceback....

@ZyX-I Thanks for the pointer, will check it out. @justinmk Haven't tried, likely not. I'm not eager to get this merged quickly, but rather want to test-drive it a bit...

I think it would be best to support multiline error messages in Neovim/python also (https://github.com/neovim/neovim/pull/9520 (https://github.com/neovim/neovim/pull/7969)). Changes here still make sense in general, but I just came back to it...

Just tried it, and it works for me using Python 3.6.6 and pynvim master. It needs `\n` to actually write it though. Also `vim.command("echom 1")` worked.

However, only the first command gets run. With the following only `1` will be displayed: ```vim :py3 async def foo(): vim.command('echom 1'); vim.command('echom 2') :py3 import asyncio; asyncio.ensure_future(foo()) ```

Yeah, your issue after all.. - so confirming ;)

https://github.com/neovim/python-client/blob/fbf0c843284ee33eca2dc4d62aec178809b0463d/neovim/msgpack_rpc/session.py#L63-L69

Using `async_=True` works around this.

Is that something that `nvim.request` should handle? Or should/could there be a decorator or context manager that you could then use with your `async def` function?