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

查看:207
本文介绍了如何在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 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天全站免登陆