zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
48.47k stars 2.89k forks source link

Add problemMatcher support to tasks #18952

Open gdamore opened 1 week ago

gdamore commented 1 week ago

Check for existing issues

Describe the feature

The tasks feature is great in Zed, but it would be good if it could support problemMatcher like VSCode can. We need this for D, as our compiler emits error messages in a somewhat unconventional way.

It would be extremely nice to be able to clink on a link and go right to the source of the problem.

If applicable, add mockups / screenshots to help present your vision of the feature

No response

notpeter commented 3 days ago

Hi @gdamore,

Thanks for pointing mentioning problem matchers, I was not previously familiar with them. It seems like it's basically a regex with capture groups for [file, line, column, severity, message, code] and then a mapping of numerical capture group numbers for each.

Can you give an example of the output which you are looking to match from the D compiler?

We've recently incorporated some improvements detecting more styles of file:(line,column) references as clickable url in terminal:

But perhaps a more generalized approach is warranted, e.g. allowing language extensions and user settings to provide more niche matchers.