Skip to content

Instantly share code, notes, and snippets.

@jamescalderon
Last active February 8, 2024 13:44
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamescalderon/e6332ed039fd1bdaa710532a56161a28 to your computer and use it in GitHub Desktop.
Save jamescalderon/e6332ed039fd1bdaa710532a56161a28 to your computer and use it in GitHub Desktop.
jQuery Intellisense and Plugins in VS Code

To make VS Code properly implement jQuery intellisense, do the following:

  1. Make a file called jsconfig.json:
{
    "typeAcquisition": {
        "include": [
            "jquery"
        ]
    }

}
  1. Save that file to the root (AKA right next to) of where your JS file is (copy the same file for each jQuery project). You may want to add the file to .gitignore before you commit.

  2. Restart VS Code - V E R Y I M P O R T A N T ! !

  3. Now you can use plugins:

Reap the benefits:

Image of Snippets

O-Right!

{
"typeAcquisition": {
"include": [
"jquery"
]
}
}
@hainh
Copy link

hainh commented Jan 20, 2022

Thanks!
You don't need to restart VS Code now :)

@Pinto2291
Copy link

Thank you so much for this, is simply but very useful, I am also using jquery directly inside my project without a CDN using a minimize version of the code of Jquery and using two scripts on the head of my html with the async attribute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment