如何在 VS Code 中为 Markdown 禁用 IntelliSense? [英] How to disable IntelliSense in VS Code for Markdown?

查看:44
本文介绍了如何在 VS Code 中为 Markdown 禁用 IntelliSense?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不想在 Visual Studio Code 中对 Markdown 文件进行单词补全,如何禁用它?理想情况下,仅适用于 Markdown,但在最坏的情况下,即使是全局切换也不错.

I don't want word completion for Markdown files in Visual Studio Code, how do I disable it? Ideally, for Markdown only but in the worst case, even a global switch would be good.

推荐答案

可以配置 VS Code 中的 IntelliSense 建议 全局或每个工作区 以及1.9 每个文件类型(语言),使用 editor.quickSuggestionseditor.acceptSuggestionOnEntereditor.suggestOnTriggerCharacters 设置.

IntelliSense suggestions in VS Code can be configured globally or per each workspace and as of 1.9 per file-type (language), using the editor.quickSuggestions, editor.acceptSuggestionOnEnter and editor.suggestOnTriggerCharacters settings.

// Controls if quick suggestions should show up or not while typing
"editor.quickSuggestions": true,

文件类型设置(首选,从 1.9 版本开始)

File-type settings (preferred, as of 1.9 release)

F1 打开命令面板kbd> 并运行 Configure language specific settings 命令,然后选择 Markdown.将打开一个新的编辑器窗格,您可以在其中放置这些设置:

Open the Command Palette by pressing F1 and run the Configure language specific settings command, then select Markdown. A new editor pane will open where you can place those settings:

// Place your settings in this file to overwrite the default settings
{
  "[markdown]": {
    "editor.quickSuggestions": false
  }
}

通过这种方式,您将仅对 Markdown 文件禁用 IntelliSense.

This way you'll disable IntelliSense for markdown files only.

全球

F1命令面板>,输入open user settings,然后按Enter.将打开一个新的编辑器窗格,您可以在其中放置这些设置:

Open Command Palette by pressing F1, type open user settings and press Enter. A new editor pane will open where you can place those settings:

// Place your settings in this file to overwrite the default settings
{
    "editor.quickSuggestions": false
}

工作区

工作区设置允许设置自定义设置而不将它们应用到您的其他 VS Code 项目.工作区设置文件位于项目中的 .vscode 文件夹下.

Workspace settings allows to set custom settings without applying them to your other VS Code projects. The workspace settings file is located under the .vscode folder in your project.

F1命令面板>,输入open workspace settings,然后按Enter.当您可以放置​​与上面列出的相同的剪辑时,将打开一个新的编辑器窗格.

Open Command Palette by pressing F1, type open workspace settings and press Enter. A new editor pane will open when you can place same snipped as listed above.

我不知道目前是否可以将设置与选定的文件类型相关联.

I don't know if it's currently possible to associate settings with selected filetypes.

其他配置选项

除了 editor.quickSuggestions 之外,还可以更改其他几个选项以进一步自定义 IntelliSense 的工作方式:

In addition to editor.quickSuggestions several other options can be changed to further customize how IntelliSense works:

// Controls if quick suggestions should show up while typing
"editor.quickSuggestions": false,

// Controls if suggestions should be accepted with "Enter" - in addition to "Tab". Helps to avoid ambiguity between inserting new lines and accepting suggestions.
"editor.acceptSuggestionOnEnter": false,

// Controls the delay in ms after which quick suggestions will show up.
"editor.quickSuggestionsDelay": 10,

// Enable word based suggestions
"editor.wordBasedSuggestions": false,

// Controls if the editor should automatically close brackets after opening them
"editor.autoClosingBrackets": false,

// Controls if suggestions should automatically show up when typing trigger characters
"editor.suggestOnTriggerCharacters": false

这篇关于如何在 VS Code 中为 Markdown 禁用 IntelliSense?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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