Current section
Files
Jump to
Current section
Files
README.md
# ernest
A highlighter for Gleam warnings and errors
[](https://hex.pm/packages/ernest)
[](https://ernest.hexdocs.pm/)
```sh
gleam add ernest@1
```
```gleam
import ernest
pub fn main() -> Nil {
let diagnostic =
"error: Unknown variable
┌─ /path/to/project/src/project.gleam:4:3
│
4 │ println(\"Hello, World!\")
│ ^^^^^^^
The name `println` is not in scope here.
Did you mean one of these:
- io.println"
let assert Ok(diagnostic) = ernest.parse(diagnostic)
io.println(ernest.to_ansi(diagnostic))
}
```
Further documentation can be found at <https://ernest.hexdocs.pm/>.