dropbox / mypy-PyCharm-plugin

A simple plugin that allows running mypy from PyCharm and navigate between errors
Apache License 2.0
313 stars 14 forks source link

Feature request: remember links between messages and lines as files are edited #17

Closed gvanrossum closed 5 years ago

gvanrossum commented 5 years ago

In Emacs, when you load a file by clicking on a compiler message, it creates a temporary mapping between all the compiler messages for that file and MARKS in that file. Then when you edit the file in response to the first message, adding or removing lines, when you click on the second message, it goes to the MARK that that message pointed to before you edited the file, rather than just using the line number to go to that line (which may no longer be the right line).

I have no idea whether PyCharm supports such a thing, but if it does, this would be great -- right now I often end up re-running mypy just to fix the associations between messages and code, rather than hunting up and down for where the error might be.

ilevkivskyi commented 5 years ago

This is actually a very good idea. I also remember I wanted this several times, but didn't have time to implement it. This is supported by IntelliJ, and can be done with Document.createRangeMarker().