draw red squiggly under compile error

I have a CodeMirror buffer. I run a compilation step and get an error of the form:

filename: String
row_start: i32, col_start: i32,
row_end: i32, col_end: i32
error: String

So now I want to draw a red squiggly from (row_start, col_start) to (row_end, col_end). I also want to possibly display the (error: String) somewhere useful.

Is there recommended sample code I can look at?

I found CodeMirror Lint Example , but it is not quite what I want.

In my case, my linter / compiler is running in a separate webworker thread. Thus, I need something that is “async” rather than “sync” for the linting. Any advice on setting this up?

Lint sources can be async. Reading the docs a bit before you jump on the forum can save a lot of time.

1 Like

Thank you for your patience. :slight_smile: