sphinx-contrib / spelling

A spelling checker for Sphinx-based documentation
https://sphinxcontrib-spelling.readthedocs.io/en/latest/
BSD 2-Clause "Simplified" License
82 stars 48 forks source link

Provide column number of spelling error #127

Open marsfan opened 3 years ago

marsfan commented 3 years ago

I use VS Code problem matchers to automatically add spelling issues to the Problems Pane in VS Code based on the output of this extension. Currently, the extension will only provide a line number for the spelling error. It would be very useful to also have the column number where the misspelled word starts, so that when selecting the error in the Problems pane my cursor jumps directly to the beginning of misspelled word.

I would propose simply adding the column number to be right after the line number, and separated with a colon.

Current error message:

\path\to\mistake:3: Spell check: useable: ["usable", "use able", "use-able", "saleable", "sublease"]: This might not be useable yet

Proposed addition of column:

\path\to\mistake:3:19: Spell check: useable: ["usable", "use able", "use-able", "saleable", "sublease"]: This might not be useable yet
dhellmann commented 2 years ago

@pgerell did some work in #160 to improve the line number location reporting. You could try building on that to include the position within the line.