admin管理员组

文章数量:1309187

In Visual Studio Code, I get suggestions when I type in a Razor file. Pressing Spacebar accepts the suggestion. This is often not the word I wanted to type.

Example:

Pressing Spacebar changes "all" to "allow," which is not what I wanted.

At first, I thought these suggestions could be disabled by diabling quick suggestions for this language, aspnetcorerazor.

So I tried adding this to my settings.json file:

"[aspnetcorerazor]": {
    "editor.quickSuggestions": {
      "other": "off",
      "comments": "off",
      "strings": "off"
    }
},

But that had no effect, even after restarting Visual Studio Code.

How can we disable these suggestions for Razor files?

In Visual Studio Code, I get suggestions when I type in a Razor file. Pressing Spacebar accepts the suggestion. This is often not the word I wanted to type.

Example:

Pressing Spacebar changes "all" to "allow," which is not what I wanted.

At first, I thought these suggestions could be disabled by diabling quick suggestions for this language, aspnetcorerazor.

So I tried adding this to my settings.json file:

"[aspnetcorerazor]": {
    "editor.quickSuggestions": {
      "other": "off",
      "comments": "off",
      "strings": "off"
    }
},

But that had no effect, even after restarting Visual Studio Code.

How can we disable these suggestions for Razor files?

Share Improve this question edited Feb 4 at 5:59 Ruikai Feng 11.9k1 gold badge7 silver badges16 bronze badges asked Feb 3 at 17:08 Eric EskildsenEric Eskildsen 4,7692 gold badges50 silver badges59 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

Try

"[razor]": {
    "editor.quickSuggestions": {
      "other": "off",
      "comments": "off",
      "strings": "off"
    }

now no suggestions on my side:

On myside,it works even without restarting vs code:

本文标签: cHow can I disable these suggestions in VS Code for ASPNET Razor PagesStack Overflow