Skip to content

Help user find the location in the editor for a syntax error #2576

@philrz

Description

@philrz

Repro is with Brim commit ab5b75d.

Consider the same Zed program as in the #2574 repro. If I had reason to do some kind of edit in the middle of such a wide line, the syntax error such as shown in the following screenshot is not super helpful on its own. We have have handy row numbers in the editor, but there's no way way for a user to quickly land at column 2517 and see their mistake.

image

One way I've seen other tools help in this situation is to move the user's cursor to the location in the program indicated by that row/column in the syntax error. In #2972 @jameskerr also mentioned a possible approach being to "add squiggly lines under an error in the editor", though in this case where the error is effectively out of view in the editor that might not suffice.

Now, I'm aware that we quietly append some additional Zed on the end of a user's program to help with pagination, and I know we may do even more such changes when we address issues like #2533 and #2567, so this may be easier said than done.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions