Artificial intelligent assistant

Which linters are supported by nano? In my `latex.nanorc` file, I have the following instructions: syntax "LaTeX" "\.(la)?tex$" linter lacheck However, when I press the keyboard shortcut to run the linter, I get an error message `La commande « lacheck » n'a produit aucune ligne analysable` (i.e ` The 'lacheck' command did not produce any analysable lines` in English). When I run `lacheck` by its own on my tex file it produces this output: "article.tex", line 21: missing `\ ' after "e.g.". My guess is that the format of the message is not understood by nano (version 5.8). Is there a standard protocol a linter must comply to in order to be recognised by nano?

There's a de facto standard format for compiler or linter error messages, which is the same format as `grep -n`: `_FILE_NAME_ : _LINE_NUMBER_ : _MESSAGE_`. Experimentally, nano supports that. I haven't researched if it supports any other format, but in any case it doesn't support lacheck's format.

You can define a wrapper to the lacheck command that rewrites its messages in the standard format, and tell nano to invoke that wrapper instead of invoking lacheck directly.


#!/usr/bin/env bash
set -o pipefail
lacheck "$@" 2>&1 | sed 's/^"\([^"]*\)", line /\1:/'

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 801aa69a267bd1b189d99af70ab9619c