Closed kentookura closed 3 weeks ago
@kentookura Thanks. Let me think about it. The LSP part is underdeveloped and I appreciate your efforts in trying it out.
May I confirm that your LSP server has insisted on using bytes in UTF-8? If so, it seems the easiest way is to convert all asai positions to LSP positions before comparison, not the other way around. Is there truly a need to convert LSP positions to asai positions?
@favonia Regarding the encoding, I have not made any changes from the original Asai LSP.
Indeed, at the moment it does not seem to be necessary to convert in both directions...
@kentookura Should we close this issue for now, then?
I find myself doing a lot computations with positions and ranges, of both LSP and Asai type. I am creating this issue to discuss the design of a more comprehensive set of functions to deal with this.
One API mismatch is that an LSP position is just:
but an Asai position carries more information:
so a prospective
pos_of_lsp_pos
would require another argument, probably of type TextDocumentItem.tUltimately, I would in particular like to have functions that allow me to compute if a position is inside of a range, both Asai and LSP positions/ranges.