问题描述
因此,当我在Visual Studio代码中创建一个类时,我可以全部手动完成,然后代码完成就可以正常工作,请参见下图:
So when I create a class for example in visual studio code, I can do it all manual and then code completion works just fine see image below:
因此,在上面的图片中,我已经手动输入了所有代码,没有使用任何代码段。
So in the image above I have typed all the code so far by hand NOT using any snippets.
但是在下面的图像中,我使用下面的可见图像创建了该类:
但是,当我从摘录中填写必填字段时,代码完成不起作用。参见下图:
But in the image below I created the class using a snipped see image below:But When I fill in the required fields from the snippet code completion is not working. See image below:
所以我的问题确实是我如何获得代码完成/在片段领域内工作的建议?还是在vscode中不可能?
So my question really is how do I get code completion / suggestions to work inside of the fields of a snippet? Or is this not possible in vscode?
如果需要任何澄清或其他信息,请告诉我,以便我可以添加!
If any clarification or extra information is needed let me know so I can add it!
推荐答案
尝试将此设置更改为 false
:
控制活动代码段是否阻止快速建议。
Control whether an active snippet prevents quick suggestions.
"editor.suggest.snippetsPreventQuickSuggestions": false
true
是默认设置,听起来像您想要 false
。
true
is the default, sounds like you want false
.
这篇关于代码段VS Code中的代码完成不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!