Search code examples
visual-studio-codeideintellisensevscode-extensions

Auto complete creates 'highlighted text' which prevents auto-suggestion


As you can see from this video: https://i.sstatic.net/3nLxr.jpg

When I autocomplete 'class' by pressing 'tab' the text I enter will be 'highlighted'.

You can see, 'tw-grid' is suggested, which should auto-complete as the top suggestion by pressing tab again. However this does not happen, the only way to allow 'tab' to auto complete the top suggestion is to:

  1. arrow key down and hit 'tab'
  2. press 'esc' or 'tab' and move the cursor back to the text and retype.

Any suggestions to fix this weird highlighting behavior, i would really just like to type 'cl' + tab = class=""

'twg' + tab = class="tw-grid" Without this constant leaving and re-entering the class block


Solution

  • Try disabling this setting:

    Editor > Suggest: Snippets Prevent Quick Suggestions  // default is enabled
    

    The issue is that when you class it inserts a snippet: class='|' with the cursor at the pipe. So you are still inside a snippet and apparently that is enough to prevent your next typing (twg) to focus any suggestion.