deno_doc icon indicating copy to clipboard operation
deno_doc copied to clipboard

Fix location line and column

Open dsherret opened this issue 3 years ago • 1 comments

It seems the line and column on Location is display oriented. There are two issues though:

  1. We're using a tab indent width of 4. Shouldn't it be 2 since we use 2 spaced indents in deno fmt?
  2. Currently the line is 1-indexed, but the column is 0-indexed.

All that said, should this even be "display" oriented?

dsherret avatar Sep 03 '21 14:09 dsherret

It has been display oriented, because it is generally used to create external links to source code. The line is far more important than the column.

Personally I am fine either way, but changing it to not be display would be a non-trivial breaking change. Feels like we should be consistent though among deno_lint and the LSP and any other places. We are all over the place when storing/representing stuff like this.

kitsonk avatar Sep 10 '21 04:09 kitsonk