vscode为自动完成选择不寻常的选项 [英] vscode chooses unusual option for autocomplete

查看:238
本文介绍了vscode为自动完成选择不寻常的选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用最新版本的Visual Studio Code时,我正在编辑JavaScript文件,并且经常要将输出记录到控制台。我创建了一个用户代码段,以便更轻松地自动完成,但我发现我在自动填充中获得的默认选项是下面的红色突出显示选项(而不是绿色,这是我的代码段):

While using the latest version of Visual Studio Code I am editing a JavaScript file and often want to log output to the console. I created a user snippet to make this easier to autocomplete but I've found that the default option I get in my autocomplete is the red highlighted option below (instead of the green which is my snippet):

我想知道两件事:


  1. 这个非标准自动完成来自何处?我可以删除它吗?

  2. vscode如何确定哪些匹配项是默认值,我可以影响它首先选择我的片段吗?


推荐答案

您可以将此editor.snippetSuggestions:top添加到您的配置以确保片段始终排在最前面

You can add this "editor.snippetSuggestions": "top" to your configuration to ensure snippets are always sorted on top

这篇关于vscode为自动完成选择不寻常的选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆