gabe
gabe

Reputation: 95

Visual Studio Code - Emmet / Intellisense autocomplete does not seem to work inside attributes

I'm just starting out learning html/css in vscode and came across this issue.

  1. New HTML doc
  2. Type inp and then press TAB
  3. As expected you get the full, pre-filled and text pre-selected <input type="text" name="" id="">
  4. If one now types, "text" gets replaced with the new characters, as expected
  5. Pressing Tab automatically goes in between the " " of name=, as expected
  6. If you then start typing, you do not get any auto-complete suggestions. So, if you have had a <label for="test1">, and then an <input..., you would not get the test1 suggestion when typing in the "pre-selected" syntax.
  7. If you, however, after pressing tab press the left arrow and then right arrow to move the caret back and forth a character(and therefore losing the pre-selection) you now get the auto-suggestion when typing.

Am I missing something?

Example here: https://streamable.com/hgwtyp

Upvotes: 1

Views: 3840

Answers (2)

Syed Mishar Newaz
Syed Mishar Newaz

Reputation: 567

You have to press ctrl+space there to get suggestions immediately. Also, you can modify the config like:

    "editor.quickSuggestions": {
        "other": true,
        "comments": true,
        "strings": true
    },
    "editor.acceptSuggestionOnCommitCharacter": true,
    "editor.acceptSuggestionOnEnter": "on",
    "editor.quickSuggestionsDelay": 10,
    "editor.suggestOnTriggerCharacters": true,
    "editor.tabCompletion": "on",
    "editor.suggest.localityBonus": true,
    "editor.suggestSelection": "recentlyUsed",
    "editor.wordBasedSuggestions": true,
    "editor.parameterHints.enabled": true,

Upvotes: 0

gabe
gabe

Reputation: 95

Someone else on github pointed me in the right direction. This is what I was after:

"editor.suggest.snippetsPreventQuickSuggestions": false

Upvotes: 3

Related Questions