vscode-intelephense icon indicating copy to clipboard operation
vscode-intelephense copied to clipboard

希望增加代码的智能提示

Open wuqiyin opened this issue 3 years ago • 9 comments

如果php代码如下:

$test = "myName";

代码中有myName这个词,再接下来的编码中,我希望在输入my的时候,能够智能提示myName这个词,这个功能很有用

wuqiyin avatar Jul 19 '22 09:07 wuqiyin

First, use the English language and the issue template. Secondly (as far as I understand), check your VSCode setting editor.wordBasedSuggestionsMode and set it to allDocuments. This should help

kanlukasz avatar Jul 25 '22 16:07 kanlukasz

After this setting is enabled, it is valid in other programming languages, but it is still invalid in PHP. VeryCapture_20220726093016

wuqiyin avatar Jul 26 '22 01:07 wuqiyin

没什么意义吧。。。

tianyiw2013 avatar Aug 05 '22 01:08 tianyiw2013

有意义的,你经常写代码就有深刻体会了

wuqiyin avatar Aug 05 '22 01:08 wuqiyin

有意义的,你经常写代码就有深刻体会了

大量重复的字符串内容时,用常量不是更好吗。

tianyiw2013 avatar Aug 05 '22 01:08 tianyiw2013

vscode里有个editor.wordBasedSuggestionsMode设置项就是实现这个功能的,只是php有问题而已,很多场景不适合设置常量,例如thinkphp3.2里,模型初始化都是D("ModelName"),不能为每个模型名称设置常量,但是又要经常写这种类似代码

wuqiyin avatar Aug 05 '22 01:08 wuqiyin

"php.suggest.basic": false 关掉vscode默认PHP提示就有了 试下 我的是正常的 就是vscode也有phpstorem一样的 alt+/就智能完成文本

qa2080639 avatar Aug 08 '22 09:08 qa2080639

"php.suggest.basic": false 关掉vscode默认PHP提示就有了 试下 我的是正常的 就是vscode也有phpstorem一样的 alt+/就智能完成文本

我的还是不行,不知道啥原因

wuqiyin avatar Aug 09 '22 02:08 wuqiyin

"php.suggest.basic": false 关掉vscode默认PHP提示就有了 试下 我的是正常的 就是vscode也有phpstorem一样的 alt+/就智能完成文本

今天写的时候,发现会提示了,感谢

wuqiyin avatar Aug 10 '22 07:08 wuqiyin

I'm unable to reproduce the original issue and am unsure if there is still a problem here. Please open a new ticket with a reproducible example if there is still a problem in 1.9.x

bmewburn avatar Jan 10 '23 09:01 bmewburn