intellisense - 如何在 VS Code 中为 Markdown 禁用 IntelliSense?

标签 intellisense visual-studio-code

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

最佳答案

VS Code 中的 IntelliSense 建议可以配置 globally or per each workspace和截至 1.9 per file-type (language) ,使用 editor.quickSuggestions , editor.acceptSuggestionOnEntereditor.suggestOnTriggerCharacters settings .

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

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

打开 Command Palette按 F1 并运行 Configure language specific settings命令,然后选择 Markdown .
将打开一个新的编辑器 Pane ,您可以在其中放置这些设置:
// Place your settings in this file to overwrite the default settings
{
  "[markdown]": {
    "editor.quickSuggestions": false
  }
}

这样,您将仅为 Markdown 文件禁用 IntelliSense。

全局

开通 Command Palette按 F1,输入 open user settings并按 Enter。将打开一个新的编辑器 Pane ,您可以在其中放置这些设置:
// Place your settings in this file to overwrite the default settings
{
    "editor.quickSuggestions": false
}

工作区

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

开通 Command Palette按 F1,输入 open workspace settings并按 Enter。当您可以放置​​与上面列出的相同的剪辑时,将打开一个新的编辑器 Pane 。

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

其他配置选项

除了editor.quickSuggestions可以更改其他几个选项以进一步自定义 IntelliSense 的工作方式:
// 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

关于intellisense - 如何在 VS Code 中为 Markdown 禁用 IntelliSense?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38832753/

相关文章:

c++ - 是否可以在 VS2008 中的预处理器指令 block (如 #ifndef ... #endif)中启用智能感知

c++ - 如何设置 Intellisense 以在 C++ 中显示自定义数据类型?

visual-studio-code - 在 VsCode 中设置 GLSLValidatorPath

visual-studio-code - 可以在更新时向 VSCode 扩展/颜色主题的用户显示通知吗?

python - 从 Visual Studio Code powershell 运行 Anaconda 命令

winforms - Visual Studio Intellisense 一直在骗我

c++ - 为 Intellisense/对象浏览器等记录 COM 对象

javascript - JetBrains WebStorm 智能感知

python - 为什么我的 launch.json 上会出现 “Property pythonPath is not allowed”?

python - 在 VS Code 终端中显示耗时