Open nishanthkarthik opened 1 year ago
Basic changes:
methods.rkt
.methods.rkt
, forward textDocument/selectionRange
message to another function xx
in text-document.rkt
.xx
, check the hash table fields that is converted from the json message, abstract real logic into doc.rkt
, and process errors, then return.Some notes:
struct.rkt
that correspond the typescript interface in the specification.read/syntax
to process text string from scratch.Personal opinion:
Implementation discuss:
I don't know how this feature interact with users at editor side. But the specification says typically selection ranges correspond to the nodes of the syntax tree.
You can run read/syntax
on the text string, maintain the result between textDocument/didChange
requests, and query the node that contains the given position.
I would be more than happy to try implementing this myself if you give me a few pointers on how to get started :)