-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Current behavior:
Intellisense/ AutoComplete Not Working in VS Code.
Desired behavior:
Intellisense/ AutoComplete Should Work in VS Code.
Problem:
I have been working on this problem for 8+ hours. I have tried adding /// ..., jsconfig.json, tsconfig.json, duplicating it on cypress folder and combination of these. Autocomplete works on Jetbrain's Webstorm browser.
Hacky Solution:
-
So I took backup(just in case) and deleted 'Code' folder located in "C:\Users\(UserName)\AppData\Roaming\Code" in Windows.
-
Follow Official Docs
Or Follow what I did:
I created 'tsconfig.json'(although I use.jsfile) under 'cypress' folder and pasted this:
{
"compilerOptions": {
"allowJs": true,
"types": ["cypress"]
},
"include": ["**/*.*"]
}So I dont have to use /// <reference types="Cypress" /> in every cypress file.
- Reloaded VS Code and autocomplete started working!
[I also deleted extension folder and reverted backup - No change - So not necessary to delete extension folders]
I use windows 7 and dont know if it should be done in mac etc. Take backup and dont blame me if you dont know what you are doing. Or just install Webstorm(Jetbrain) and test if autocomplete works and if it works then proceed to the hacky solution I mentioned.
DONT CLOSE THIS ISSUE:
The solutions is hacky and should be solved by fixing Cypress, not deleting VSCode files!