Open php4fan opened 1 month ago
I start with this code:
Note that the cursor is currently after the semicolon.
Now I place the cursor right after $foo and type an underscore:
$foo
It should suggest me to autocomplete $foo_bar, but it doesn't.
$foo_bar
I even add a b:
b
Still nothing.
The only way to get all the expected suggestions is to delete everything after the $ and start typing the variable name from scratch again.
$
Here's the code for you to copy and paste and try:
<?php $foo = 123; $foo_bar = 456; $s = "lalala $foo_b";
It's 100% systematically reproducible for me.
Outside of "" strings, it works as expected.
""
thank you for the test case, you are correct.
Inside "" the VSCode does not tokenize the code, so it is up to us to trigger code completion in a very hacky way. We did it only after typing $ so far.
I start with this code:
Note that the cursor is currently after the semicolon.
Now I place the cursor right after
$foo
and type an underscore:It should suggest me to autocomplete
$foo_bar
, but it doesn't.I even add a
b
:Still nothing.
The only way to get all the expected suggestions is to delete everything after the
$
and start typing the variable name from scratch again.Here's the code for you to copy and paste and try:
It's 100% systematically reproducible for me.
Outside of
""
strings, it works as expected.