关于片段的信息很少
little information about snippets
尝试插入片段时,无论是自定义的还是由 vscode 提供的,我没有足够的信息从建议中进行选择。
例如,我有 "template" 的自定义代码段:
"template js": {
"prefix": "template",
"body": ["<template>", " [=10=]", "</template>"],
"description": "template js description"
}
如果我输入 "templ"(对于 "template"),我将看到 3 个建议:我的自定义代码段和 vscode 的 2 个。
但是在每个建议旁边我都看到了这个:
代码段 1:
Provider: snippetCompletions
score: 48, compared 'template vue' with 'templ'
distance: 0, see localityBonus-setting
index: 17, based on sortText: "a-template vue"
代码段 2:
Provider: snippetCompletions
score: 40, compared 'template, template' with 'templ'
distance: 0, see localityBonus-setting
index: 18, based on sortText: "z-template"
代码段 3:
Provider: snippetCompletions
score: 48, compared 'template, template' with 'templ'
distance: 0, see localityBonus-setting
index: 19, based on sortText: "z-template"
我怎么知道选择哪一个?
如果我能在建议旁边看到代码段的正文或描述,将会有所帮助。
provider: ... score: ...
信息表明你在VS Code的IntelliSense explain mode中。此模式仅在开发提供建议的扩展时有用,不应正常使用,因为它隐藏了重要信息,包括代码段内容。
要退出解释模式,只需打开一些建议并触发toggleExplainMode
命令(cmd/是默认的keybinding 在 MacOS 上)
还要确保 expand the completion details(单击右侧的小 (i)
):
尝试插入片段时,无论是自定义的还是由 vscode 提供的,我没有足够的信息从建议中进行选择。
例如,我有 "template" 的自定义代码段:
"template js": {
"prefix": "template",
"body": ["<template>", " [=10=]", "</template>"],
"description": "template js description"
}
如果我输入 "templ"(对于 "template"),我将看到 3 个建议:我的自定义代码段和 vscode 的 2 个。
但是在每个建议旁边我都看到了这个:
代码段 1:
Provider: snippetCompletions
score: 48, compared 'template vue' with 'templ'
distance: 0, see localityBonus-setting
index: 17, based on sortText: "a-template vue"
代码段 2:
Provider: snippetCompletions
score: 40, compared 'template, template' with 'templ'
distance: 0, see localityBonus-setting
index: 18, based on sortText: "z-template"
代码段 3:
Provider: snippetCompletions
score: 48, compared 'template, template' with 'templ'
distance: 0, see localityBonus-setting
index: 19, based on sortText: "z-template"
我怎么知道选择哪一个? 如果我能在建议旁边看到代码段的正文或描述,将会有所帮助。
provider: ... score: ...
信息表明你在VS Code的IntelliSense explain mode中。此模式仅在开发提供建议的扩展时有用,不应正常使用,因为它隐藏了重要信息,包括代码段内容。
要退出解释模式,只需打开一些建议并触发toggleExplainMode
命令(cmd/是默认的keybinding 在 MacOS 上)
还要确保 expand the completion details(单击右侧的小 (i)
):