@jonsterling @favonia
The way I am currently creating completion items in the forester LSP is that I just map over the environment that results from expanding the entire forest, but in light of OCaml-style local opens, this is not the correct thing to do. I need to consider what is visible at the cursor position in order to create the correct items.
I would like to create a function of the following signature:
val visible_at: position: Lsp.Types.Position.t -> Syn.t -> exports
where Syn.t is defined here and exports is defined here
One thing I am considering is to write a variant of expand that works roughly like:
if node.loc < position
expand next node
else
return currently visible
Does this seem viable? Keen to hear your thoughts!