nvim-neotest / neotest-go

MIT License
125 stars 43 forks source link

feat: improve colored output #26

Open Davincible opened 1 year ago

Davincible commented 1 year ago

Continuation of #24

Davincible commented 1 year ago

image

I've added more coloring for testify output, the extra coloring is nice but I'm not sure about the colors themselves yet. Open to suggestions

Davincible commented 1 year ago

Panic highlight: image

Davincible commented 1 year ago

Changed to built-in functions. Didn't know about them

Davincible commented 1 year ago

There are two small bugs I'm not sure how to resolve;

  1. if a panic occurs and the goroutine number is 19, this artifact occurs
  2. sometimes patterns get overwritten by others, here the bytes after the file number are uncolored. This happens randomly. This is because color patterns in the table are unordered, which is fine, but even though all patterns should get applied to the same line, they somehow don't.

image

Edit: Nr. 1 happens because it does a 'replace all' on the number 19, which happens to be also contained in the color codes. Thus currently a pattern like <red>ABC</red> <green>ABC</green> wouldn't work because all occurrences would be colored green