从扩展中禁用 wordBasedSuggestions [英] Disable wordBasedSuggestions from an Extension

查看:20
本文介绍了从扩展中禁用 wordBasedSuggestions的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为 VSCode 开发一个扩展,它提供完成项,但其中有单词建议.

I'm developing an extension for VSCode which is supplying completion items but there are word suggestions among them.

我知道您可以在您的用户/工作区设置中禁用 editor.wordBasedSuggestions 但有没有办法从扩展中做到这一点?

I know you can in your User/Workspace settings disable editor.wordBasedSuggestions but are there a way to this from an extension?

推荐答案

是的,扩展可以通过在 package.json 中贡献 configurationDefaults 来更改设置的默认值:

Yes, extensions can change the default value of settings by contributing configurationDefaults in package.json:

"contributes": {
    "configurationDefaults": {
        "[lang]": {
            "editor.wordBasedSuggestions": false
        }
    }
}

其中 lang 是相关语言的 ID.

Where lang is the ID of the language in question.

这篇关于从扩展中禁用 wordBasedSuggestions的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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