I have an issue with the intelliprompt completion list when I use the
My CompletionProvider uses token scanning and AST examination.
When the request session is called, I use a token reader to determine the
current context and the AST to create the completion items.
if I type 'myVar' and then '.', I want to show the fields of the
I type 'myVa', a parse is requested, I get a ParseData in my document and I type
'r.', the completion list is requested, my completion provider scans the tokens
('myVar' and '.') and knows the context (After a dot, I have to show the fields
of the expression before the dot), gets the offset before the dot, translates it
to the snapshot version of the ParseData, gets the AST node for this offset BUT
the node is 'myVa' and no variable corresponds to this variable, so the
completion list is empty.
What is the best way to do this (with token scanning and AST examination) ?
I don't want to use only token scanning because I may have a complex expression
before a dot, and the AST is there to do this job, right ?
I don't want to block UI if the parsing operation takes time, so the
ThreadedParseRequestDispatcher is mandatory.