neoclide / coc-python

Python extension for coc.nvim, fork of vscode-python
574 stars 51 forks source link

Propagate formatter error messages #122

Open andy-kwei opened 4 years ago

andy-kwei commented 4 years ago

When I run :CocAction('format'), I will get the message [coc.nvim] Formatted with black whether the formatter succeeds or fails (I also tried yapf and the same behavior occurs).

I'm wondering if it's possible to propagate errors from the formatter to the user, or at least provide some way to differentiate between success and failure states.

Btw, thanks for this great plugin!

justinmoon commented 4 years ago

I think I have a similar problem. It says [coc.nvim] Formatted with black but the my file doesn't change at all when it should.

Edit: the issue was my file had a syntax error. It would be nice if coc-python could report there was a syntax error. I realized there was a syntax error when I ran black on command line and an error was produced.

FelipeMarcelino commented 4 years ago

@justinmoon I have the same issue, but my syntax is correct!