5

VS code has suddenly stopped recognizing html files (the file icon is the default one for files with no extension)

all other file extensions work just fine

all other file extensions work just fine

except for html

except for html

the tags still work but it won't autocomplete

Álvaro González
  • 128,942
  • 37
  • 233
  • 325
seolbinism
  • 71
  • 1
  • 3
  • If you type `@builtin html` in the search box of the extensions pane, what do you get? And, have you customised `files.associations`? – Álvaro González Nov 18 '18 at 14:56
  • Same for me, no 'files.associations' or exclusions in the settings and also no HTML files in the tree nav. Even the "open file" picker is not showing them. Adding the *.html association did not work... – JimBob Oct 07 '20 at 09:12

2 Answers2

11

Adding this to file extensions worked for me:

"files.associations": {
        "*.html": "html"  
} 
salpreh
  • 133
  • 2
  • 5
user1169907
  • 115
  • 1
  • 2
5

In my case, for this problem the solution was to manually add *.html to files.associations, in user settings. Its unlogical but it seems that somehow the extension wasn't associated to the type of file. Now everything works perfectly...

massisenergy
  • 1,695
  • 2
  • 11
  • 22
pablish
  • 51
  • 1
  • 2