Skip to content

Add errorformat local option #4

@vm70

Description

@vm70

Do you think it would be a good idea to add Mermaid CLI's multi-line error format to this filetype plugin?

Here's an example error from a simple Mermaid file I wrote:

graph LR
  a --> b
  c --> d
  e --> -->
Error: Parse error on line 4:
...b  c --> d  e --> -->
---------------------^
Expecting 'AMP', 'COLON', 'PIPE', 'TESTSTR', 'DOWN', 'DEFAULT', 'NUM', 'COMMA', 'NODE_STRING', 'BRKT', 'MINUS', 'MULT', 'UNICODE_TEXT', got 'LINK'

I think that corresponds to the following error format:

setlocal errorformat=%EError:\ Parse\ Error\ on\ line\ %l:
setlocal errorformat+=%C%.%#\ \ %s
setlocal errorformat+=%C%p^
setlocal errorformat+=%Z%m

In my fork of this repo, I condensed the above lines into one; but there are still some problems with how the column number is set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions