Как отключить IntelliSense в коде VS для Markdown?

Я не хочу завершения слова для файлов Markdown в коде Visual Studio, как его отключить? В идеале, для Markdown только, но в худшем случае, даже глобальный переключатель был бы хорош.

Ответы

Ответ 1

Предложения IntelliSense в VS Code могут быть настроены глобально или для каждой рабочей области и с 1.9 для каждого типа файла (язык), используя настройки editor.quickSuggestions, editor.acceptSuggestionOnEnter и editor.suggestOnTriggerCharacters .

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

Настройки типа файла (предпочтительнее, начиная с версии 1.9)

Откройте Палитра команд, нажав F1 и запустите команду Configure language specific settings, затем выберите Markdown. Новая панель редактора откроется там, где вы можете разместить эти настройки:

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

Таким образом вы отключите IntelliSense только для файлов разметки.

Global

Откройте Палитра команд, нажав F1, введите open user settings и нажмите Enter. Новая панель редактора откроется там, где вы можете разместить эти настройки:

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

Workspace

Параметры рабочей области позволяет устанавливать пользовательские настройки, не применяя их к другим проектам кода VS. Файл настроек рабочей области находится в папке .vscode в вашем проекте.

Откройте Палитра команд, нажав F1, введите open workspace settings и нажмите Enter. Новая панель редактора откроется, когда вы сможете поместить ее так же, как указано выше.

Я не знаю, возможно ли в настоящее время связать настройки с выбранными типами файлов.

Другие параметры настройки

В дополнение к 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

Ответ 2

В дополнение к тому, что сказал @JakubS, есть еще две настройки, которые помогут устранить IntelliSense:

// 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,

Параметр editor.autoClosingBrackets остановит Visual Studio Code от автоматической установки закрывающей скобки, скобки, скобки, одиночной кавычки, двойной кавычки и т.д.

Опция editor.suggestOnTriggerCharacters перестанет появляться окно автозаполнения при вводе знака или точки доллара.

Все вместе, вот что я использую:

// 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