[ ] The range can be slimmed down by taking advantage of the fact we're indexing source code. For each range, we're storing two positions, each of which have the document's URI, line and column variables. The line and column are integers, which are 32 bits each, but we're indexing lines and columns. The column is unlikely to go past a byte's worth of integer space, and the line is unlikely to go past 14 bits ever. Consider using variable integer encoding to encode both line and column, and pull out the uri into a single list of [uri, varint_line, varint_column_binary].
Ideas:
[uri, varint_line, varint_column_binary]
.