-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coc-pyright removes sourcery's quickfixes #172
Comments
Try |
Hm, for me it doesn't work. I tried this as well as |
Sorry, I don't use Sourcery, can not to test or debug this. |
I use both Sourcery and PyRight. Could you post a code example so that we are talking about the same thing? |
Hi @marcoaaguiar. The code is in the first comment, you just need to open the fold |
My bad didn't notice. Anyway, it works just fine for me. I used the method that I explained in sourcery-ai/sourcery#43 (comment) to setup Sourcery (Downloading the release from their Github page) |
With the latest version of everything (coc.nvim, pyright, sourcery), I cannot reproduce the error you posted. That is, quickfix works just fine. |
@anstadnik, are you running all the latest versions? |
Yes, I can confirm that the issue is gone |
I'm experiencing a similar issue with the following snippet (from the sourcery tutorial): def dictionary_get():
dictionary = {}
data = ""
if "message" in dictionary:
data = dictionary["message"] CocDiagnostics output:
With the pyright error present, Then when I update the snippet to fix the pyright error to: def dictionary_get():
dictionary = {}
data = ""
if "message" in dictionary:
data = dictionary["message"]
return data CocDiagnostics lists no more pyright errors, only the same sourcery suggestion:
And (coc-codeaction) shows the sourcery suggestion with the cursor on any line in the buffer and (coc-codeaction-line) shows the suggestion on L2, L3 and L4, as you would expect. It appears the pyright error is swallowing the coc-codeaction sourcery suggestion for the entire buffer and the coc-codeaction-line sourcery suggestion on the line where the pyright error occurs. Whether this is an issue with pyright, coc-nvim or sourcery I can't say... Finally, note that doHover does work on the line with the pyright error (for the original snippet): |
Sourcery is an AI tool that refactors code link. It adds items to
:CocFix
, when it finds any ways to improve the code. When coc-pyright is installed, it somehow overwrites those fixes.e.g.
When coc-pyright is not installed,
:CocFix
changesdict()
to{}
. With coc-pyright installed, nvim prints[coc.nvim] No quickfix action available
.Code from the image
The text was updated successfully, but these errors were encountered: