本文介绍了字符串的 VSCode 自动完成/智能感知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 sublime 中处理 PHP 或 JavaScript 文件时,如果我输入以下代码:

While working with a PHP or JavaScript file in sublime, if I type the following code:

$test = "Scott";
If($test == null) {
    $test2 = "Scott"
}

当我输入$test2 = ‘Sc..."时,Sublime 会自动补全Scott",因为它是在当前文档范围内作为字符串找到的一个词.

When I typed in "$test2 = ‘Sc..." Sublime would autocomplete "Scott" since it was a word it found as a string in the current document scope.

然而,当我在 VSCode 中做同样的测试时,它并没有选择它或提供任何建议.这在 VSCode 中可能吗?我已经在首选项中打开了所有 true 的快速建议.我不确定我还能在这里做什么,或者我是否需要下载其他插件.谢谢!

However, when I do the same test in VSCode, it doesn’t pick it up or offer any suggestions. Is this possible in VSCode? I have already turned on the quicksuggestions to all true in the preferences. I am not sure what else I could do here or if there is an additional plugin that I need to download. Thanks!

推荐答案

喜欢这个吗?

我的设置:

intelephense 扩展已启用

{
  "editor.quickSuggestions": {
    "other": true,
    "comments": false,
    "strings": true
  },
  "editor.wordBasedSuggestions": true,
  "php.suggest.basic": false
}

这篇关于字符串的 VSCode 自动完成/智能感知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 10:55