Completion of struct fields doesn't work when code is split over multiple lines.
aymanosman opened this issue · comments
@jonatanklosko maybe if the current line is empty, we should send the previous line as well for completion purposes?
Previous line may not be enough:
%Foo{
foo: 1,
bar: 2,
# <= cursor here
}
The same issue concerns multiline bitstrings.
For signature we get all text until cursor, but signature request happens relatively rarely. Since autocompletion is enabled on typing by default, we make much more such requests, so we want to minimise the amount of text we send.
We could use AST information on the client side to get the broader scope in the several cases where we know it's relevant.
Erm..., I didn't expect you to fix it in less than a day. Mind blown.