lsp4intellij icon indicating copy to clipboard operation
lsp4intellij copied to clipboard

Diagnostics are not shown if the start and end character offset are the same

Open nadeeshaan opened this issue 3 years ago • 5 comments

Description: Consider the following scenario,

function test() returns {
}

In the above, I have a diagnostics at the start of the {. For example, my params look as below,

{
   "start":{
      "line":0,
      "character":25
   },
   "end":{
      "line":0,
      "character":25
   }
}

nadeeshaan avatar Mar 11 '22 10:03 nadeeshaan

But it has no sense, hasn't it?.. You can't highlight range with 0 length.

nixel2007 avatar Mar 11 '22 11:03 nixel2007

@nixel2007 I was thinking if we can provide the same behaviour as in VSCode since VSCode properly provides the diagnostic in this scenario.

nadeeshaan avatar Mar 11 '22 12:03 nadeeshaan

@nadeeshaan could you share a screenshot from vscode with zero-length diagnostic?

nixel2007 avatar Mar 11 '22 12:03 nixel2007

@nixel2007 please refer the following, Screen Shot 2022-03-11 at 5 46 07 PM

nadeeshaan avatar Mar 11 '22 12:03 nadeeshaan

Hm. Interesting. Looks like vscode adds some "virtual" space char for highlighting

nixel2007 avatar Mar 11 '22 12:03 nixel2007