mfussenegger/nvim-lint

Feature Request: Change default behavior when linter only provides start column

EricDriussi opened this issue · 1 comments

Hi there!
I was migrating over from null-ls/none-ls and noticed that markdownlint behaved differently: No underlines would appear where they did with null-ls.

I looked around the issues and found this similar one. This comment seems to explain the issue.

This got me thinking: wouldn't it be reasonable to change the default behavior so that, if the provided diagnostics don't contain a range/end column, the end of the line would be used instead of the starting column?

I'm guessing there might be more linters that only provide start column to signify the whole line as troublesome.

Looking around the code it seems like changing this and this line would achieve that but I'm not quite sure it this makes sense.

Is there a reason why the default behavior is the way it currently is?

I don't see why highlighting the end of line would be more reasonable. The diagnostic could refer to the word starting at the column, or a couple of words, without end information it's simply not clear what range is affected.

I've no plans to change this