“Find All References” across files for a method/function in VSCode is not possible

前端 未结 3 1838
难免孤独
难免孤独 2020-12-28 16:24

Visual Studio Code version 1.27.2

Find all References only list references in the current file. I need to find all references

3条回答
  •  执念已碎
    2020-12-28 17:05

    Advanced features such as Find all references are implemented by each language extension.

    For JavaScript, try creating a jsconfig.json at the root of your workspace with the contents:

    {
        "compilerOptions": {
            "target": "ES6"
        },
        "exclude": [
            "node_modules",
            "**/node_modules/*"
        ]
    }
    

    This file tells VS Code to treat all JS files in your workspace as part of the same javascript project. Find all references still may not work properly in JavaScript if your code is too dynamic. It works best against modern js that uses import/export, class, and friends

提交回复
热议问题