perl-language-server
perl-language-server copied to clipboard
Support completion for keys of a hash table
Thank you for this wonderful project. I enjoy using it for quite some time.
However, I noticed that it seems to lack the ability to do semantic completion for:
If I have a hash table
%b={
"apple"=>"good",
"orange"=> "bad",
}
$a=\%b
It seems that it cannot auto-complete for neither $a->{
nor %b{
, which IMHO is possible and would be really helpful.
I have not fully checked the document and code, so if the feature is already included I sincerely apologize in advance.
This is difficult to do for the same reason it's difficult to know what methods are available on a variable.
We could collect all hash keys found in the document and offer those for auto complete but it's impossible to know what the keys are across files.