Virtual Text Highlighting on the line(s) of the failure/error
heimer16 opened this issue · comments
Hi,
It would be nice if we could highlight the line that the error occurs, rather than just on the line of the function, maybe with some virtual text similar to LSP diagnostics. I've taken a few screenshots to try and demonstrate. Ideally it could highlight across buffers use a "stack trace" or something so you could "go to definition" on a function and open another buffer and it would continue to show the relevant line. I'm currently using the phpunitkit plugin for sublime text which could serve as a reference
current: only highlights the line of the function that failed
sublime text: highlights the line where the failure/error occurs
lsp: as an example of what it could look like
I'm willing to try and help but my experience in python/lua is very limited.
Thanks!
Hmm this is definitely a cool idea... It would require significant changes to the output parsing which is also required in #70 so I can keep that in mind when working on that but that won't be done for a while I'd imagine, I'm quite busy at the moment unfortunately. I appreciate the offer for help but to be honest since it ties into something that requires large changes I think I'd only be happy doing it myself.
OK I've got this implemented in #75. Right now I've only got a parser for pytest. I've never used PHP before so you'll have to provide some examples of the test runners output so I can write a parser. Alternatively if you want to write one yourself, I'd be happy to take a PR. You can see how the pytest one is implemented in the code and unit tests. It uses this library for parsing https://github.com/sighingnow/parsec.py