1

I have created a custom language plugin for VS Code.
Also I created a task with a custom problem matcher:

"problemMatcher": {
            "owner": "customlang",
            "fileLocation": ["relative", "./"],
            "severity": "error",
            "pattern": {
                "regexp": "^(.*)<(\\d+)>\\s:(.*):(.*)",
                "file": 1,
                "line": 2,
                "message": 4
            }
        }

This works fine and reports errors correctly in the Problems tab at the bottom.
However, I have to manually click the error to jump to it.

Is there a way to automatically jump to an error, once there is one?
(in this language, there are never multiple errors at once)

1 Answer 1

1

As far as I know, there is no way to do this using the built in tasks.

You can open an issue requesting this feature at https://www.github.com/microsoft/vscode/issues/new

If you use your extension to do the build, though, instead of tasks, you can have your extension execute the build (for example, if it was typescript you would use node to execute tsc) and you would process the output yourself to create a "diagnostic" (i.e. problems) and you could then jump to it.

But I don't think tasks can automatically jump to them and your extension can't see the problems reported by the task.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.